Created
February 13, 2017 02:01
-
-
Save quintopia/68647804904622032a1600c76e695ebb to your computer and use it in GitHub Desktop.
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.uix.widget import Widget | |
from kivy.uix.scatter import Scatter | |
from kivy.core.window import Window | |
from kivy.uix.floatlayout import FloatLayout | |
Window.clearcolor = (1, 1, 1, 1) | |
class TextSquare(Widget): | |
pass | |
class ScatterTestApp(App): | |
def build(self): | |
f = FloatLayout() | |
scatter = Scatter(do_rotation=False,do_scale=False) | |
scatter.add_widget(TextSquare()) | |
f.add_widget(scatter) | |
return f | |
if __name__ == '__main__': | |
ScatterTestApp().run() |
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
#:kivy 1.0.9 | |
<TextSquare>: | |
canvas: | |
Color: | |
rgb: 0,0,0 | |
Rectangle: | |
pos: 20,20 | |
size: 100,50 | |
Rectangle: | |
pos: 30,30 | |
size: 80,30 | |
Label: | |
font_size: 30 | |
center_x: self.width / 2 | |
center_y: self.height / 2 | |
text: "Test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment