ボタンの真ん中に単純な「X」を描こうとしています。次の描画コードを挿入しました。
width, height = self.size
x, y = self.pos
x1, x2 = x + int(width*0.3), x + int(width*0.7)
y1, y2 = y + int(height*0.3), y + int(height*0.7)
with self.canvas:
Line(points=[x1, y1, x2, y2], width=1, cap='none')
Line(points=[x2, y1, x1, y2], width=1, cap='none')
self.canvas.ask_update()
2 本の対角線は、まったく同じ整数座標を使用しているにもかかわらず、同じようには描かれていません。左上から右下はエイリアスで描画され、もう一方はエイリアスされていません。それらを一貫させるにはどうすればよいですか?
私は Windows バージョンの kivy でテストしていて、他のプラットフォームではまだ試していません。