LD_Objects.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def DrawHighlightment(self, dc):
        scalex, scaley = dc.GetUserScale()
        dc.SetUserScale(1, 1)
        dc.SetPen(MiterPen(HIGHLIGHTCOLOR))
        dc.SetBrush(wx.Brush(HIGHLIGHTCOLOR))
        dc.SetLogicalFunction(wx.AND)
        # Draw two rectangles for representing the contact
        left_left = (self.Pos.x - 1) * scalex - 2
        right_left = (self.Pos.x + self.Size[0] - 2) * scalex - 2
        top = (self.Pos.y - 1) * scaley - 2
        width = 4 * scalex + 5
        height = (self.Size[1] + 3) * scaley + 5

        dc.DrawRectangle(left_left, top, width, height)
        dc.DrawRectangle(right_left, top, width, height)
        dc.SetLogicalFunction(wx.COPY)
        dc.SetUserScale(scalex, scaley)

    # Adds an highlight to the connection
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号