绘制图像后,我尝试使用export_to_png保存捕获的图像捕获。导出仅保存边框和我包含的说明。如何导出带有边框和说明的图形?
draw.kv
#:import utils kivy.utils
<Draw>:
FloatLayout:
BoxLayout:
id: myexport
canvas.before:
Color:
rgba: .5, .5, .5, .5
Line:
width: 50
rectangle: self.x, self.y, self.width, self.height
Label:
pos_hint: {"top": .9, "center_x": .5}
size_hint: 1, .1
text: "Draw an image"
font_size: 25
Button:
pos_hint: {"top": .1, "right": 1}
size_hint: .1, .1
text:
"Submit"
on_release:
myexport.export_to_png("drawing.png", scale = float)