animationrotation.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:dxf2gcode 作者: cnc-club 项目源码 文件源码
def __init__( self, w, h, speed ):
        super( Screen, self ).__init__( )
        ## Old fashioned way to connect expose. I don't savvy the gobject stuff.
        self.connect ( "expose_event", self.do_expose_event )
        ## We want to know where the mouse is:
        self.connect ( "motion_notify_event", self._mouseMoved )
        ## More GTK voodoo : unmask events
        self.add_events ( gdk.BUTTON_PRESS_MASK |   gdk.BUTTON_RELEASE_MASK |   gdk.POINTER_MOTION_MASK )        
        ## This is what gives the animation life!
        gobject.timeout_add( speed, self.tick ) # Go call tick every 'speed' whatsits.
        self.width, self.height = w, h
        self.set_size_request ( w, h )
        self.x, self.y = 11110,11111110 #unlikely first coord to prevent false hits.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号