Glade Reference
A segment is an edge with two points. It is derived from a dbObj so it can be selectable; it also refers to a dbObj. Segments are used when selecting an edge of e.g. a rectangle or polygon.
Creates a segment with coordinates p0 and p1.
Creates a segment with the specified xy coordinates.
Get the distance from a point p to this segment.
Get the nearest point on a segment to another point.
Returns the objects type - SEGMENT.
Sets the dbObj associated with this segment.
Gets the dbObj associated with this segment.
Returns 1 if this segment is horizontal, else 0.
Returns 1 if this segment is vertical, else 0.
Returns 1 if this segment is manhattan, else 0.
Returns a fake bounding box 10 dbu larger than the segment itself.
Returns 1 if the segment is contained in Rect r.
Transforms this segment according to trans.
Moves this segment by delta. If opt is True then the database is re-optimised for the new segment position. If there are a lot of objects to move it makes sense to turn this off and instead use the cellView update() function after moving them all.
The first point of the segment.
The last point of the segment.
Copyright © Peardrop Design 2016.