FloatLayout
주위에 테두리를 그려야합니다. 이렇게하려면 두 사각형을 캔버스에 추가하고, 두 번째 사각형은 부모의 레이아웃보다 약간 작게 만듭니다. 이 작동합니다. 그러나 캔바스의 중심에 사각형을 정렬하는 것은 어렵습니다. 두 번째 사각형은 부모의 가운데에 배치해야하므로 그 뒤에있는 약간 큰 사각형이 표시됩니다. 작동하지 않는Kivy를 사용하여 부모의 중심에 사각형을 맞추는 방법
것들 :
Rectangle:
size: (self.width*0.99, self.height*0.99)
center: self.center ## no property for Rect named center
Rectangle:
size: (self.width*0.99, self.height*0.99)
center_x: self.center_x ## no property for Rect named center_x/y
center_y: self.center_y
Rectangle:
size: (self.width*0.99, self.height*0.99)
pos: (self.pos.x, self.pos.y) ## can't reference x/y of self