TPolyline provides a wrapper for the TGPolyline geometry class, to which it adds the facilities inherited from MGraphic: an attribute bundle, matrix transformations, and hit detection. TPolylinehas a, not is a, TGPolyline. A polyline is a collection of points that are connected with straight line segments. Polylines are parameterized, much like linear curves.
Changes the TPolyline's size according to the specified horizontal and vertical scalars (the coordinates of the first parameter). Because there are two independent scalars, the polyline's shape can change. The second parameter defines the center of scale. Every point is mapped to a new position by applying the scalars to the point's horizontal and vertical displacements from the center of scale. Thus, the scaled graphic does not stay centered at the same point unless the second argument is the old center of the graphic.
Calling Context:
Call this function directly.
Parameters:
const TGPoint & -A vector whose x-coordinate is the horizontal scalar, and whose y-coordinate is the vertical scalar.
const TGPoint & =TGPoint :: kOrigin -The point from which to measure the horizontal and vertical displacement of each point to be scaled. To create the resulting geometry, the displacements are multiplied by the horizontal and vertical scalars, respectively.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Gets the bounding rectangle of the TPolyline's geometry, without considering any area added by the bundle. (For example, the pen is a bundled attribute that can increase the area of the graphic by adding a border that extends beyond the bounds of the geometry.)
Calling Context:
Call this function directly.
Parameters:
Takes no parameters.
Return Value:
Returns the bounding rectangle, which is the smallest axis-aligned rectangle that encloses the geometry.
Exceptions:
Throws no exceptions, passes all exceptions through.
Gets the entire TPolyline's bounding rectangle, taking into account the bundle information. (For example, the pen is a bundled attribute that can increase the area of the graphic by adding a border that extends beyond the bounds of the geometry.)
Calling Context:
Called during hit detection. You can also call this function directly.
Parameters:
const TGrafPort * =NIL -The graphics port used for accessing hierarchical bundles.
Return Value:
Returns the bounding rectangle, which is the smallest axis-aligned rectangle that encloses the entire graphic, including any area added by the pen.
Exceptions:
Throws no exceptions, passes all exceptions through.
Changes the TPolyline so that it passes through the specified TGPoint at the specified parametric value. The two control points nearest to the parametric are moved so that the line segment passes through the specified point.
Calling Context:
Call this function directly.
Parameters:
GCoordinate parametric -The parametric value.
const TGPoint & toPoint -The new point that this polyline passes through.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Gets the parametric value of the TPolyline at the point on the polyline nearest to the specified TGPoint. Polylines are parameterized starting at 0 and incremented by 1 at each control point. For example, a three-point polyline has a parametric range between 0 and 2 (inclusively).
Calling Context:
Call this function directly.
Parameters:
const TGPoint & p -The point for which the parametric value is computed.
Return Value:
Returns the parametric value of the polyline corresponding to a point on the polyline nearest to the specified point.
Exceptions:
Throws no exceptions, passes all exceptions through.
Call this function by using the operator in an expression.
Parameters:
const TPolyline & source -The polyline to be compared to this polyline.
Return Value:
Returns true if any of the control points of the source polyline are not equal to this polyline's corresponding points, and if the bundles are unequal.
Exceptions:
Throws no exceptions, passes all exceptions through.