wxgraphics.py 文件源码

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

项目:cebl 作者: idfah 项目源码 文件源码
def __init__(self, parent, background='black', style=0, *args, **kwargs):
        """Initialize a new DrawablePanel.

        Args:
            parent:         wx parent object.

            style:          Style arguments passed the the wx.Panel base class.
                            The wx.NO_FULL_REPAINT_ON_RESIZE argument is added
                            to the given style arguments.

            args, kwargs:   Additional arguments passed to the wx.Panel
                            base class.
        """
        wx.Panel.__init__(self, parent=parent, style=style | wx.NO_FULL_REPAINT_ON_RESIZE,
                          *args, **kwargs)

        self.background = background

        self.lastSize = (0,0)

        # initial resize creates initial drawing
        # buffer and triggers first draw
        self.resize()

        self.Bind(wx.EVT_PAINT, self.repaint)
        self.Bind(wx.EVT_SIZE, self.resize)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号