Recent Posts
None | 6 sec ago
None | 11 sec ago
C++ | 13 sec ago
C# | 22 sec ago
None | 22 sec ago
C# | 50 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By alf on the 9th of Feb 2010 08:08:33 PM
Download |
Raw |
Embed |
Report
# -*- coding: utf-8 -*-
from pymt import *
class TestWidget(MTScatterWidget):
def __init__(self, **kwargs):
super(TestWidget, self).__init__(**kwargs)
self.pos = (0,0)
self.size = (100, 100)
def on_touch_down(self, touch):
print '-------------------------------------'
print 'widget pos: ', self.pos
print 'widget center pos: ', self.center
print 'widget to_local: ', self.to_local(self.x, self.y)
print 'widget to_window: ', self.to_window(self.x, self.y)
print 'widget to_widget: ', self.to_widget(self.x, self.y)
print 'widget.to_parent: ', self.to_parent(self.x, self.y)
super(TestWidget, self).on_touch_down(touch)
if __name__ == "__main__":
button = TestWidget()
window = getWindow()
window.add_widget(button)
runTouchApp()
Submit a correction or amendment below.
Make A New Post