Viewer.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def Draw(self, dc):
        scalex, scaley = dc.GetUserScale()
        dc.SetUserScale(1, 1)
        x, y = self.Parent.CalcUnscrolledPosition(self.x_offset, self.y_offset)

        text = self.GetInstanceName()
        if self.ActionState is not None:
            text += " ("

        dc.DrawText(text, x, y)
        tw, th = dc.GetTextExtent(text)
        if self.ActionState is not None:

            text = self.VALUE_TRANSLATION[self.ActionState]
            if self.ActionState:
                dc.SetTextForeground(wx.GREEN)
            dc.DrawText(text, x + tw, y)
            if self.ActionState:
                dc.SetTextForeground(wx.BLACK)
            tw = tw + dc.GetTextExtent(text)[0]

            text = ")"
            dc.DrawText(text, x + tw, y)
        dc.SetUserScale(scalex, scaley)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号