New to Kivy. Is there a way to crop a square image to a circle one with kivy when presenting it? Thanks!
round/circle image with kivy
3.3k Views Asked by guckmalmensch At
2
There are 2 best solutions below
0
On
You can use a canvas and set it to Elipse as follow:
from kivy.app import App
from kivy.lang import Builder
kv = '''
BoxLayout:
orientation: 'vertical'
FloatLayout:
canvas:
Color:
rgb: 1, 1, 1
Ellipse:
pos: 280, 200
size: 200 , 200
source: 'image.jpg'
angle_start: 0
angle_end: 360
'''
class App(App):
def build(self):
return Builder.load_string(kv)
App().run()
