我是个初学者。我有这个kv代码:
:
BoxLayout:
orientation: "vertical"
size: root.width, root.height
Label:
id: name_label
text: "Exercises Appear Here"
font_size: 32
Image:
id: image_window
size_hint: (1, .5)
source: 'images/dim_6543.jpg'
Button:
background_normal: ''
background_color: 0, .3, .4, .95
size_hint: (1, .5)
font_size: 32
text: "Press For Next Exercise"
on_press: root.press()我明白了:输出带有标签、图像、按钮的图像
和弦图应该有一个白色背景。我已经搜索和尝试了几个小时,几天。我如何才能得到中间部分,图像,以显示一个白色的背景周围的和弦图?和弦图没有任何周围的背景,它已经被裁剪成图表。
任何帮助都是非常感谢的..。
谢谢。
发布于 2021-01-24 21:02:19
您想要绘制一个填充图像的白色矩形。此代码如下所示:
Image:
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size发布于 2021-01-26 12:32:26
太好了,谢谢你!我复制了你的代码,它工作得很好!谢谢!
吉姆
https://stackoverflow.com/questions/65874504
复制相似问题