wxgraphics.py 文件源码

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

项目:cebl 作者: idfah 项目源码 文件源码
def refresh(self):
        """Refresh the drawing area after a change has been made.
        This method sets up a drawing context, calls self.draw
        to update the drawing and then calls self.triggerRepaint
        in order to update the drawing area on the screen.

        This method should be called each time a change is
        made that requires the drawing area to be updated.
        """
        dc = wx.MemoryDC(self.drawingBuffer)
        dc.SelectObject(self.drawingBuffer)

        dc.SetBackground(wx.Brush(self.background, style=wx.SOLID))
        dc.Clear()

        # do not draw if window is very small, right solution? XXX - idfah
        if self.winRadius < 1.0e-3:
            return

        #dc.BeginDrawing()
        self.draw(dc)
        #dc.EndDrawing()

        #del dc
        dc.SelectObject(wx.NullBitmap)
        self.triggerRepaint()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号