1546 if self.ValueSize is None and isinstance(self.ComputedValue, (StringType, UnicodeType)): |
1546 if self.ValueSize is None and isinstance(self.ComputedValue, (StringType, UnicodeType)): |
1547 self.ValueSize = self.ParentBlock.Parent.GetMiniTextExtent(self.ComputedValue) |
1547 self.ValueSize = self.ParentBlock.Parent.GetMiniTextExtent(self.ComputedValue) |
1548 if self.ValueSize is not None: |
1548 if self.ValueSize is not None: |
1549 width, height = self.ValueSize |
1549 width, height = self.ValueSize |
1550 dc.DrawText(self.ComputedValue, |
1550 dc.DrawText(self.ComputedValue, |
1551 parent_pos[0] + self.Pos.x + CONNECTOR_SIZE * self.Direction[0] + |
1551 parent_pos[0] + self.Pos.x + CONNECTOR_SIZE * self.Direction[0] + |
1552 width * (self.Direction[0] - 1) / 2, |
1552 width * (self.Direction[0] - 1) / 2, |
1553 parent_pos[1] + self.Pos.y + CONNECTOR_SIZE * self.Direction[1] + |
1553 parent_pos[1] + self.Pos.y + CONNECTOR_SIZE * self.Direction[1] + |
1554 height * (self.Direction[1] - 1)) |
1554 height * (self.Direction[1] - 1)) |
1555 dc.SetFont(self.ParentBlock.Parent.GetFont()) |
1555 dc.SetFont(self.ParentBlock.Parent.GetFont()) |
1556 dc.SetTextForeground(wx.BLACK) |
1556 dc.SetTextForeground(wx.BLACK) |
1557 |
1557 |
1558 #------------------------------------------------------------------------------- |
1558 #------------------------------------------------------------------------------- |
1559 # Common Wire Element |
1559 # Common Wire Element |