ILoop

ILoop provides a wrapper for the IGLoop geometry class. ILoop provides a wrapper for the IGLoop2D geometry class. ILoop can be used for such shapes as rounded rectangles, ellipses with control points, and more elaborate closed paths. Users wishing to modify Ellipses with control points and create fancy shapes should use this class.


ILoop - Member Functions and Data by Group

Constructors & Destructor

Use the functions in this group to construct or destroy objects of class ILoop.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ILoop
This function constructs an ILoop object.


Overload 1
Copy constructor.
public:
ILoop(const ILoop&)
Use this constructor to copy the IGLoop2D and sets the bounds to empty.

ILoop
A constant reference to the loop to be copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
ILoop(IGLoop2D* adoptLoop, IGrafBundle* adoptBundle = 0)
Use this constructor to create an ILoop object by adopting the given IGLoop2D and IGrafBundle.

adoptLoop
The IGLoop2D to be adopted.
adoptBundle
The bundle to be adopted. The default value is empty.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Default constructor.
public:
ILoop()
Use this constructor to create an ILoop which has an empty geometry and empty bounds.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Adopting the Geometry and Releasing It

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


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

IGLoop2D
The counterpart geometry to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanGeometry
public:
virtual IGLoop2D* 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


Assignment Operator

Use the function in this group to assign the given ILoop object to the target one.


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

source
The loop to be copied.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Drawing the ILoop

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


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

IGrafPort
A constant reference to the port to which drawing should go.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Getting the Bounding Information

Use the functions in this group to get 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


Modifying the ILoop Object

Use the functions in this group to transforms the graphic using the specified transformation matrix.


[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


Obtaining an Alias to Counterpart Geometry

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


[view class]
geometry
public:
virtual const IGLoop2D* 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 ILoop

Use the function in this group to determine if the loop intersects the given triangle.


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

rect
The rectangle to be intersected with.

Return
True if this loop intersects or completely encloses the rectangle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Streaming the Object In and Out

Use the functions in this group to read in the ILoop object or write it out to the given stream.


[view class]
readFromStream
protected:
virtual void readFromStream(IDataStream& toWhere)
Reads the object in from the specified stream.

fromWhere
The stream used to stream in the object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

toWhere
The stream that the object is written out to.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Testing the ILoop and IMDrawable Objects for Equality

Use the function in this group to test the ILoop against an IMDrawable object for equality.


[view class]
operator ==
public:
virtual bool operator ==(const IMDrawable&) const
Tests this ILoop 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 this one.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


ILoop - Inherited Member Functions and Data

Inherited Public Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data