Skip to content

Instantly share code, notes, and snippets.

@amirkheirabadi73
Created July 13, 2013 05:15
Show Gist options
  • Save amirkheirabadi73/5989498 to your computer and use it in GitHub Desktop.
Save amirkheirabadi73/5989498 to your computer and use it in GitHub Desktop.
Scatter is used to build interactive widgets that can be translated, rotated and scaled with two or more fingers on a multitouch system.
from kivy.app import App
from kivy.interactive import InteractiveLauncher
from kivy.uix.widget import Widget
from kivy.uix.label import Label
from kivy.uix.scatter import Scatter
from kivy.graphics import Color, Rectangle ,Ellipse ,Bezier ,BorderImage
class myApp(App):
def build(self):
mywid = Widget()
s=Scatter(do_rotation=False, do_scale=False)
with s.canvas:
Color = (1,0,0,.5)
Rectangle(pos= (0,0) , size=s.size)
mywid.add_widget(s)
return mywid
if __name__ == '__main__':
myApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment