for line in self._lines:
if attachment == -1 or (line.GetTo() == self and line.GetAttachmentTo() == attachment or line.GetFrom() == self and line.GetAttachmentFrom() == attachment):
- line.GetEventHandler().Draw(dc)
+ line.Draw(dc)
if recurse:
for child in self._children:
dc.SetBrush(wx.BLACK_BRUSH)
# Draw neck
- dc.DrawLine(root, neck)
+ dc.DrawLine(root[0], root[1], neck[0], neck[1])
if count > 1:
# Draw shoulder-to-shoulder line
- dc.DrawLine(shoulder1, shoulder2)
+ dc.DrawLine(shoulder1[0], shoulder1[1], shoulder2[0], shoulder2[1])
# Draw all the little branches
for i in range(count):
pt, stemPt = self.GetBranchingAttachmentPoint(attachment, i)
- dc.DrawLine(stemPt, pt)
+ dc.DrawLine(stemPt[0], stemPt[1], pt[0], pt[1])
if self.GetBranchStyle() & BRANCHING_ATTACHMENT_BLOB and count > 1:
blobSize = 6.0
elif pt._type == CONTROL_POINT_VERTICAL:
newX1 = pt._controlPointDragStartX
newX2 = newX1 + pt._controlPointDragStartWidth
- elif pt._type == CONTROL_POINT_DIAGONAL and (keys & KEYS or self.GetMaintainAspectRatio()):
+ elif pt._type == CONTROL_POINT_DIAGONAL and (keys & KEY_SHIFT or self.GetMaintainAspectRatio()):
newH = (newX2 - newX1) * (float(pt._controlPointDragStartHeight) / pt._controlPointDragStartWidth)
if pt.GetY() > pt._controlPointDragStartY:
newY2 = newY1 + newH