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.
Returns an Edge from the segment's coordinates.
Get the euclidean length of the segment.
Get the distance from a point p to this segment.
Get the nearest point on a segment to another point.
Returns the object's type, SEGMENT.
Returns the object's name, "SEGMENT".
Sets the dbObj associated with this segment.
Gets the dbObj associated with this segment.
Returns true if this segment is horizontal.
Returns true if this segment is vertical.
Returns true if this segment is manhattan.
Returns a fake bounding box 10 dbu larger than the segment itself.
Normalise a segment, i.e. ensure coord p0 is the lower left compared to p1.
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 2024.