LineShape may be attached to two nodes; it may be segmented, in which case a control point is drawn for each joint.
A wxLineShape may have arrows at the beginning, end and centre.
__init__ | |
AddArrow | Add an arrow (or annotation) to the line. |
AddArrowOrdered | Add an arrowhead in the position indicated by the reference list |
ClearArrow | Delete the arrow with the given name. |
ClearArrowsAtPosition | Delete the arrows at the specified position, or at any position |
Delete | |
DeleteArrowHead | Delete arrowhead by position and name. |
DeleteArrowHeadId | Delete arrowhead by id. |
DeleteLineControlPoint | Delete an arbitary point on the line. |
Draggable | |
DrawArrow | Draw the given arrowhead (or annotation). |
DrawArrows | Draw all arrows. |
DrawRegion | Format one region at this position. |
EraseRegion | Erase one region at this position. |
FindArrowHead | Find arrowhead by position and name. |
FindArrowHeadId | Find arrowhead by id. |
FindLineEndPoints | Finds the x, y points at the two ends of the line. |
FindLinePosition | Find which position we’re talking about at this x, y. |
FindMinimumWidth | Find the horizontal width for drawing a line with arrows in |
FindNth | Find the position of the line on the given object. |
FormatText | Format a text string according to the region size, adding |
GetAlignmentEnd | |
GetAlignmentOrientation | |
GetAlignmentStart | |
GetAlignmentType | |
GetArrows | |
GetAttachmentFrom | Return the attachment point on the ‘from’ node. |
GetAttachmentTo | Return the attachment point on the ‘to’ node. |
GetBoundingBoxMin | |
GetEnds | Get the visible endpoints of the lines for drawing between two objects. |
GetFrom | Return the ‘from’ object. |
GetLabelPosition | Get the reference point for a label. |
GetLineControlPoints | |
GetNextControlPoint | Find the next control point in the line after the start / end point, |
GetTo | Return the ‘to’ object. |
HitTest | |
Initialise | Initialise the line object. |
InsertLineControlPoint | Insert a control point at an optional given position. |
IsEnd | TRUE if shape is at the end of the line. |
IsSpline | TRUE if a spline is drawn through the control points. |
MakeControlPoints | Make handle control points. |
MakeLineControlPoints | Make a given number of control points (minimum of two). |
OnBeginDragLeft | |
OnCreateLabelShape | |
OnDragLeft | |
OnDraw | |
OnDrawContents | |
OnDrawControlPoints | |
OnDrawOutline | |
OnEndDragLeft | |
OnErase | |
OnEraseControlPoints | |
OnLabelMovePre | |
OnMoveLink | Called when a connected object has moved, to move the link to |
OnMoveMiddleControlPoint | |
OnMovePre | |
OnSizingBeginDragLeft | |
OnSizingDragLeft | |
OnSizingEndDragLeft | |
ResetControlPoints | |
Select | |
SetAlignmentOrientation | |
SetAlignmentType | |
SetAttachmentFrom | Set the ‘from’ shape attachment. |
SetAttachments | Specify which object attachment points should be used at each end |
SetAttachmentTo | Set the ‘to’ shape attachment. |
SetEnds | Set the end positions of the line. |
SetFrom | Set the ‘from’ object for the line. |
SetIgnoreOffsets | Set whether to ignore offsets from the end of the line when drawing. |
SetSpline | Specifies whether a spline is to be drawn through the control points. |
SetTo | Set the ‘to’ object for the line. |
Straighten | Straighten verticals and horizontals. |
Unlink | Unlink the line from the nodes at either end. |
LineShape may be attached to two nodes; it may be segmented, in which case a control point is drawn for each joint.
A wxLineShape may have arrows at the beginning, end and centre.
Add an arrow (or annotation) to the line.
type may currently be one of:
end may currently be one of:
arrowSize specifies the length of the arrow.
xOffset specifies the offset from the end of the line.
name specifies a name for the arrow.
mf can be a wxPseduoMetaFile, perhaps loaded from a simple Windows metafile.
arrowId is the id for the arrow.
Add an arrowhead in the position indicated by the reference list of arrowheads, which contains all legal arrowheads for this line, in the correct order. E.g.
Reference list: a b c d e Current line list: a d
Add c, then line list is: a c d.
If no legal arrowhead position, return FALSE. Assume reference list is for one end only, since it potentially defines the ordering for any one of the 3 positions. So we don’t check the reference list for arrowhead position.
Delete the arrow with the given name.
Delete the arrows at the specified position, or at any position if position is -1.
Delete arrowhead by position and name.
if position is -1, matches any position.
Delete arrowhead by id.
Delete an arbitary point on the line.
Draw the given arrowhead (or annotation).
Draw all arrows.
Format one region at this position.
Erase one region at this position.
Find arrowhead by position and name.
if position is -1, matches any position.
Find arrowhead by id.
Finds the x, y points at the two ends of the line.
This function can be used by e.g. line-routing routines to get the actual points on the two node images where the lines will be drawn to / from.
Find which position we’re talking about at this x, y.
Returns ARROW_POSITION_START, ARROW_POSITION_MIDDLE, ARROW_POSITION_END.
Find the horizontal width for drawing a line with arrows in minimum space. Assume arrows at end only.
Find the position of the line on the given object.
Specify whether incoming or outgoing lines are being considered with incoming.
Format a text string according to the region size, adding strings with positions to region text list.
Return the attachment point on the ‘from’ node.
Return the attachment point on the ‘to’ node.
Get the visible endpoints of the lines for drawing between two objects.
Return the ‘from’ object.
Get the reference point for a label.
Region x and y are offsets from this. position is 0 (middle), 1 (start), 2 (end).
Find the next control point in the line after the start / end point, depending on whether the shape is at the start or end.
Return the ‘to’ object.
Initialise the line object.
Insert a control point at an optional given position.
TRUE if shape is at the end of the line.
TRUE if a spline is drawn through the control points.
Make handle control points.
Make a given number of control points (minimum of two).
Called when a connected object has moved, to move the link to correct position
Set the ‘from’ shape attachment.
Specify which object attachment points should be used at each end of the line.
Set the ‘to’ shape attachment.
Set the end positions of the line.
Set the ‘from’ object for the line.
Set whether to ignore offsets from the end of the line when drawing.
Specifies whether a spline is to be drawn through the control points.
Set the ‘to’ object for the line.
Straighten verticals and horizontals.
Unlink the line from the nodes at either end.