### 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.

~IArea

      public:
      virtual ~IArea()

  Destroys the IArea object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

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.

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

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

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.

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.

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

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.

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.

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.

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.

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

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.

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

  -     virtual ~IMDrawable()

  -     bool operator !=(const IMDrawable&) const

  IMGraphic

  -     virtual ~IMGraphic()

  -     virtual void
          adoptAttributeState( IAttributeState* adoptedAttributeState )

  -     virtual void adoptBundle(IGrafBundle* adoptedBundle)

  -     virtual const IAttributeState* attributeState() const

  -     virtual const IGrafBundle* bundle() const

  -     virtual void draw(IGrafPort& port) const = 0

  -     virtual IGRect2D geometricBounds() const = 0

  -     IMGraphic()

  -     virtual IAttributeState* orphanAttributeState()

  -     virtual IGrafBundle* orphanBundle()

  -     virtual void
          rotateBy( GDegrees,
                    const IGPoint2D& centerOfRotation = IGPoint2D::origin ( ) )

  -     virtual void
          scaleBy( const IGPoint2D&,
                   const IGPoint2D& centerOfScale = IGPoint2D::origin ( ) )

  -     virtual void transformBy(const IGrafMatrix&) = 0

  -     virtual void translateBy(const IGPoint2D&)

  IMStreamable

  -     virtual ~IMStreamable()

  -     void externalizeToStream(IDataStream& towhere) const

  -     void internalizeFromStream(IDataStream& fromwhere)

  -     virtual const ITypeRepresentation&
          typeRepresentation() const = 0

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IMDrawable

  -     IMDrawable(const IMDrawable&)

  -     IMDrawable()

  -     IMDrawable& operator =(const IMDrawable& source)

  IMGraphic

  -     IMGraphic(IGrafBundle* adoptedBundle)

  -     IMGraphic(const IMGraphic&)

  -     IMGraphic& operator =(const IMGraphic& source)

  -     virtual void resetTimeStamp()

  -     void setHit(bool flag)

  -     virtual void setTimeStamp(const unsigned long&)

  -     virtual unsigned long timeStamp() const

  -     virtual void updateTimeStamp()

  IMStreamable

  -     IMStreamable(const IMStreamable& other)

  -     IMStreamable()

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

  -     virtual void writeToStream(IDataStream& towhere) const = 0

#### Inherited Protected Data

  - None