Skip to content

Instantly share code, notes, and snippets.

@kived
Created September 26, 2014 20:38
Show Gist options
  • Save kived/7714e4678db26935358f to your computer and use it in GitHub Desktop.
Save kived/7714e4678db26935358f to your computer and use it in GitHub Desktop.
from kivy.uix.widget import Widget
from kivy.properties import BoundedNumericProperty, ListProperty
from kivy.lang import Builder
Builder.load_string('''
<Circle>:
r: 100
color: 0, 0, 1, 1
canvas:
Color:
rgba: self.color
Line:
circle: self.center_x, self.center_y, self.r
width: 10
''')
class Circle(Widget):
r = BoundedNumericProperty(100, min=0)
color = ListProperty()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment