| Attributes | Curve Objects | Constants |
When an empty curve has been created, segments can be appended using the functions listed in this section. The first segment of a curve must be a line segment.
Append a line segment to self. p must be a PointSpec.
cont is the continuity at the end node and defaults to
ContAngle.
Append a bezier segment to self. p, p1, and p2 must be PointSpecs. The control points of the bezier segment are the current end point of the curve, p1 and p2 (which are only approximated) and p.
cont is the continuity at the end node and defaults to
ContAngle.
Append a segment. If the first parameter is CurveLine, this
method is equivalent to AppendLine(p, cont),
with cont defaulting to ContAngle.
If the first parameter is CurveBezier, this method is
equivalent to AppendLine(p1, p2, p,
cont), with cont defaulting to ContAngle.
This method is mainly supplied as the opposite of the method Segment.
The following methods usually take the index of a segment as argument.
This index counts from 0 to len - 1. If the index is negative it
counts from the end, just like for other sequences.
Return the segment number i as a 4-tuple.
If the segment is a line segment the result is of the form:
(CurveLine, (), p, cont)
if it is a bezier segment the result has the form:
(CurveBezier, (p1, p2), p, cont)
The result is suitable as argument tuple to AppendSegment.
Return the ith node as a point object.
Return the continuity at node i.
Return the type of the ith segment (either CurveLine
or CurveBezier).
Replace the ith segment by a line segment. The arguments p, x, y and cont are used as in AppendLine.
Replace the ith segment by a bezier segment. The rest of the arguments are used as in AppendBezier.
Replace the ith segment by the segment described by the rest of arguments, which are used as in AppendSegment.
Close the curve.
Apply the transformation trafo (a trafo object) to the path. The path is modified in place.
Translate the path by offset, a point object. The path is modified in place.
Return true (1) if the ith segment is selected, false (0) otherwise.
Mark the ith segment as selected if flag is true and as unselected otherwise. flag defaults to true.
| Attributes | Curve Objects | Constants |