Created
May 2, 2016 20:34
-
-
Save kived/5e4da1a1c46a2fe2896598872aa8f0e6 to your computer and use it in GitHub Desktop.
Kivy: rotate texture
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
import kivy | |
kivy.require('1.8.1') | |
from kivy.app import App | |
from kivy.lang import Builder | |
root = Builder.load_string(''' | |
FloatLayout: | |
Widget: | |
pos_hint: {'center_x': 0.5, 'center_y': 0.5} | |
size_hint: 0.6, 0.6 | |
canvas: | |
Color: | |
rgba: 1, 1, 1, 1 | |
Rectangle: | |
pos: self.pos | |
size: self.size | |
source: '/home/ryan/Pictures/yeah-science-bitch.jpg' | |
PushMatrix | |
Rotate: | |
angle: 90 | |
origin: self.center | |
Rectangle: | |
pos: self.pos | |
size: self.size | |
source: '/home/ryan/Pictures/yeah-science-bitch.jpg' | |
PopMatrix | |
''') | |
class TestApp(App): | |
def build(self): | |
return root | |
if __name__ == '__main__': | |
TestApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am looking for reliable person. who leads a healthy lifestyle. I want him to share my interests about gym and spending time actively. And of course I am looking for the man with a good sense of humor!