Skip to content

Instantly share code, notes, and snippets.

@kived
Created May 2, 2016 20:34

Revisions

  1. kived created this gist May 2, 2016.
    35 changes: 35 additions & 0 deletions texrottest.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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()