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.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
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.


[view class]
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


[view class]
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


[view class]
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.


[view class]
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.


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


[view class]
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.


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


[view class]
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.


[view class]
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


[view class]
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.


[view class]
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
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data