wxgraphics.py 文件源码

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

项目:cebl 作者: idfah 项目源码 文件源码
def resize(self, event=None):
        """Handle wx resize events.

        Notes:
            This method may be called outside the wx event buffer
            in order to initialize the panel or reset the drawing
            buffer.
        """
        size = self.winWidth, self.winHeight = self.GetSize()
        if size != self.lastSize: # hack to mitigate multiple consecutive resize events
            self.winRadius = min((self.winWidth/2.0, self.winHeight/2.0))
            #self.drawingBuffer = wx.Bitmap(self.winWidth, self.winHeight) # wxpython3
            self.drawingBuffer = wx.EmptyBitmap(self.winWidth, self.winHeight) # wxpython3
            self.lastSize = size
            self.refresh()

        if event is not None:
            event.Skip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号