FBD_Objects.py 文件源码

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

项目:beremiz 作者: nucleron 项目源码 文件源码
def GetBlockBoundingBox(self, connectors=True):
        bbx_x, bbx_y = self.Pos.x, self.Pos.y
        bbx_width, bbx_height = self.Size
        if connectors:
            bbx_x -= min(1, len(self.Inputs)) * CONNECTOR_SIZE
            bbx_width += (min(1, len(self.Inputs)) + min(1, len(self.Outputs))) * CONNECTOR_SIZE
        if self.ExecutionOrder != 0:
            bbx_x = min(bbx_x, self.Pos.x + self.Size[0] - self.ExecutionOrderSize[0])
            bbx_width = max(bbx_width, bbx_width + self.Pos.x + self.ExecutionOrderSize[0] - bbx_x - self.Size[0])
            bbx_height = bbx_height + (self.ExecutionOrderSize[1] + 2)
        return wx.Rect(bbx_x, bbx_y, bbx_width + 1, bbx_height + 1)

    # Refresh the block bounding box
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号