IArea

IArea provides a wrapper for the IGArea geometry class. The IGArea class defines an arbitrarily shaped area by performing certain binary CAG (Constructive Area Geometry) operations to combine other area defining geometries.


IArea - Member Functions and Data by Group

Constructors & Destructor

Use the functions in this group to create and destroy IArea objects.


[view class]
~IArea
public:
virtual ~IArea()
Destroys the IArea object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IArea


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

IArea
The area to be copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IArea(IGArea* adoptArea, IGrafBundle* adoptBundle = 0)
Use this constructor to create an IArea by adopting an IGArea and an IGrafBundle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Default constructor. Constructs an IArea which has an empty geometry and empty bounds.
public:
IArea()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Accessing the Geometry or Changing Its Ownership

Use the objects in this group to access the geometry, adopt it, or revert ownership of it to the caller.


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

IGArea*
The counterpart geometry to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


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

Return
A pointer to the counterpart geometry.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanGeometry
public:
virtual IGArea* 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 operator in this group to assign the given geometry to the target one.


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

source
The area to be copied.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Getting the Geometry Bounding Information

Use the functions in this group to get the geometry's bounding rectangle information.


[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. This function 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 Area or Changing Its Position

Use the functions in this group to transform the area's shape and change its position.


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

const IGrafMatrix&
The transformation matrix by which the graphic's points are multiplied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining Information About the Area

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


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

rect
The rectangle to be intersected with.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Rendering the Geometry

Use the function in this group to draw the area to the port.


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

IGrafPort&
The port to which drawing should go.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Streaming an Object In and Out

Use the functions in this group to read an object in from and write it out to the specified stream.


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

fromWhere
The stream used to read in the object.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
writeToStream
protected:
virtual void writeToStream(IDataStream& toWhere) const
Writes the IArea 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 an IArea and an IMDrawable Object for Equality

Use the operator in this group to test an IArea object against an IMDrawable one for equality.


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

const IMDrawable&
The IMDrawable to be compared with this one.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IArea - Inherited Member Functions and Data

Inherited Public Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data