IPolyline

IPolyline provides a wrapper for the IGPolyline geometry class. IPolyline provides a wrapper for the IGPolyline2D geometry class. A polyline is a collection of points that are connected with straight line segments. Polylines are parameterized, much like linear curves.


IPolyline - Member Functions and Data by Group

Constructors & Destructor

Use the constructors and destructor in this group to create and destroy objects of class IPolyline.


[view class]
~IPolyline
public:
virtual ~IPolyline()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IPolyline
This function constructs an object of class IPolyline.


Overload 1
public:
IPolyline( IGPolyline2D* adoptPolyline, IGrafBundle* adoptBundle = 0 )
Use this constructor to create an IPolyline by adopting an IGPolyline2D and an IGrafBundle

adoptPolygon
The IGPolygon2D to be adopted.
adoptBundle
The bundle to be adopted. The default value is empty.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
Default constructor.
public:
IPolyline()
Use the function in this group to construct an IPolyline which has an empty geometry and empty bounds.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Copy constructor. Copies the IGPolyline2D and sets the bounds to empty.
public:
IPolyline(const IPolyline&)

IPolyline
A constant reference to the polyline to be copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator =
public:
IPolyline& operator =(const IPolyline& source)
Assignment operator.

source
The polyline to be copied.

Return
A const reference to the left-hand side line.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Drawing the Polyline

Use the function in this group to draw the polyline to the given graphics port.


[view class]
draw
public:
virtual void draw(IGrafPort&) const
Draws the IPolyline to the specific IGrafPort.

IGrafPort
A reference to the graphics port the graphic is drawn to.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining an Alias to Counterpart Geometry

Use the function in this group to get an alias for accessing the counterpart geometry.


[view class]
geometry
public:
virtual const IGPolyline2D* geometry()
Returns an alias for accessing counterpart geometry.

Return
A pointer to the counterpart geometry.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining Information About the IPolyline

Use the function in this group to determine if the geometry intersects the given rectangle.


[view class]
intersects
public:
virtual bool intersects(const IGRect2D& rect) const
Tests if this polyline intersects with the specified rectangle. It also handles any degenerated rectangle which encloses zero area. If this polyline is not hitEnabled, the function returns false.

rect
The rectangle to be intersected with.

Return
True if this polyline intersects the rectangle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining or Releasing Ownership of the IPolyline

Use the functions in this group to obtain ownership of the geometry or return it to the caller.


[view class]
adoptGeometry
public:
virtual void adoptGeometry(IGPolyline2D*)
Takes over the ownership of a geometry after deleting any existing geometries.

IGPolyLine2D
The counterpart geometry to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanGeometry
public:
virtual IGPolyline2D* orphanGeometry()
Returns the ownership of a geometry to the caller.

Return
A pointer to the orphaned geometry

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining the Bounding Information

Use the functions in this group to obtain the bounding rectangle of the geometry or the device dependent bounds of the graphic.


[view class]
geometricBounds
public:
virtual IGRect2D geometricBounds() const
Gets the bounding rectangle of the geometry, without considering any area added by the bundle.

Return
The bounding rectangle, which is the smallest axis-aligned rectangle that encloses the geometry.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
looseFitBounds
public:
virtual IGRect2D looseFitBounds(const IGrafPort* = 0) const
Returns the device dependent bounds of the graphic. Includes the cap, joints, pen width. Is dependent on the port in which the graphic is rendered. If the port is not defined, then returns geometric bounds.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Streaming the Object In and Out

Use the functions in this group to read the object in from the specified data stream or write it out to one.


[view class]
readFromStream
protected:
virtual void readFromStream(IDataStream& toWhere)

fromWhere
The stream from which the IPolyline object is read in.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
writeToStream
protected:
virtual void writeToStream(IDataStream& toWhere) const
Writes the IPolyline object out to the specified stream.

toWhere
The stream that the polyline is written out to.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Testing the IPolyline and IMDrawable Objects for Equality

Use the function in this group to compare the IPolyline and IMDrawable objects for equality.


[view class]
operator ==
public:
virtual bool operator ==(const IMDrawable&) const
Tests this IPolyLine and IMDrawable for equality, by determining whether the geometries are equal and the bundles are equal.

IMDrawable
A constant reference to the IMDrawable to be compared with the IPolyline one.

Return
True if this IPolyLine and the argument have equal geometries and bundles.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Transforming the Geometry

Use the function in this group to change the shape or position of the geometry.


[view class]
transformBy
public:
virtual void transformBy(const IGrafMatrix&)
Transforms the graphic's shape and position by applying the specified transformation matrix.

IGrafMatrix
A constant reference to the transformation matrix by which the graphic's points are multiplied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IPolyline - Inherited Member Functions and Data

Inherited Public Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data