Created
July 13, 2013 05:15
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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