Skip to content

Instantly share code, notes, and snippets.

@kived
Created May 2, 2016 20:34
Show Gist options
  • Save kived/5e4da1a1c46a2fe2896598872aa8f0e6 to your computer and use it in GitHub Desktop.
Save kived/5e4da1a1c46a2fe2896598872aa8f0e6 to your computer and use it in GitHub Desktop.
Kivy: rotate texture
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()
@Adamaiao
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment