### ICurve

  ICurve provides a wrapper for the TGCurve geometry class. ICurve provides a wrapper for the IGCurve2D geometry class. A IGCurve2D is a Non-Uniform Rational B-Spline (NURB) of arbitrary degree.

### ICurve - Member Functions and Data by Group

### Constructors & Destructor

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

~ICurve

      public:
      virtual ~ICurve()

Supported Platforms

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

ICurve

  Overload 1
  Copy constructor. Copies the IGCurve2D and the matrix. Sets the bounds to empty.

      public:
      ICurve(const ICurve&)

  const ICurve&
    The curve to be copied.

Supported Platforms

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

  Overload 2

      public:
      ICurve(IGCurve2D* adoptCurve, IGrafBundle* adoptBundle = 0)

Supported Platforms

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

  Overload 3
  Default constructor. Constructs an ICurve which has an empty geometry and empty bounds.

      public:
      ICurve()

Supported Platforms

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

### Accessing the Curve Object or Changing Its Ownership

Use the functions in this group to adopt ownership of the geometry or return it to the caller or to obtain an alias for accessing counterpart geometry.

adoptGeometry

      public:
      virtual void adoptGeometry(IGCurve2D*)

  Takes over the ownership of a geometry after deleting any existing geometries.

  IGCurve2D*
    The counterpart geometry to be adopted.

Supported Platforms

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

geometry

      public:
      virtual const IGCurve2D* 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 IGCurve2D* 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 this operator to assign the given curve object to the target one.

operator =

      public:
      ICurve& operator =(const ICurve& source)

  Assignment operator.

  source
    The curve to be copied.

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

Supported Platforms

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

### Modifying the Curve and Changing Its Position

Use the function in this group to transform the curve'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.

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

Supported Platforms

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

### Obtaining Information About the Curve

Use the function in this group to determine whether the curve intersects a given rectangle.

intersects

      public:
      virtual bool intersects(const IGRect2D& rect) const

  Tests if this curve intersects with the specified rectangle. It also handles any de-generated rectangle which encloses zero area. If this curve is not "hitEnabled", the function returns false.

  rect
    The rectangle to be intersected with.

Return
  True if this curve intersects the rectangle.

Supported Platforms

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

### Obtaining the Curves Bounding Information

Use the functions in this group to identify the curve's bounding rectangle.

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
  Includes width of pen, attributes and capping. If no device is defined, then returns geometric bounds.

      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

### Rendering the Curve

Use the function in this group to drawn the curve.

draw

      public:
      virtual void draw(IGrafPort&) const

  Draws the ICurve to the specific IGrafPort.

  IGrafPort&
    The port to which drawing should go.

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 object from a stream and write it out to one.

readFromStream

      protected:
      virtual void readFromStream(IDataStream& toWhere)

  Reads the curve object in from the specified stream.

  fromStream
    The stream to be used to stream in the object.

Supported Platforms

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

writeToStream

      protected:
      virtual void writeToStream(IDataStream& toWhere) const

  Writes the ICurve object out to the specified stream.

  toWhere
    The stream to which the object is written out.

Supported Platforms

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

### Testing the ICurve and an IMDrawable Object for Equality

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

operator ==

      public:
      virtual bool operator ==(const IMDrawable&) const

  Tests this ICurve 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 ICurve and the argument have equal geometries and bundles.

Supported Platforms

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

### ICurve - 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()

  -     IMStreamable(const IMStreamable& other)

  -     virtual void readFromStream(IDataStream& fromwhere) = 0

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

#### Inherited Protected Data

  - None