ILine

The ILine class provides a wrapper for the geometry IGLine. It is used for drawing line segments. ILine is a wrapper for the geometry IGLine. It is used for drawing line segments. IInfiniteLine is not supported. Users wishing to use should subclass to for usage.


ILine - Member Functions and Data by Group

Constructors & Destructor

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


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
ILine


Overload 1
public:
ILine(IGLine2D* adoptLine, IGrafBundle* adoptBundle = 0)
Use this constructor to create an ILine object using the given values.

adoptLine
The geometry to be adopted adoptBundle The bundle to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
Copy Constructor.
public:
ILine(const ILine&)
Use this constructor to create a line that is copied from the given one.

line
- The value to be copied.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
Default constructor.
public:
ILine()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Accessing Counterpart Geometry

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


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

Return
(IGLine2D*) The counterpart geometry.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment Operator

Assignment operator. Use this operator to assign the given line object to the target one.


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

source
The line to be copied.

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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Determining If the Line Intersects a Specific Rectangle

Use the function in this group to determine if the current line object intersects the given rectangle.


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

rect
The rectangle to be intersected with.

Return
True if this line intersects the rectangle .

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining and Releasing Ownership of the Line Geometry

Use the functions in this group to adopt the line geometry or return it to the caller.


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

IGLine2D*
The counterpart geometry to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanGeometry
public:
virtual IGLine2D* orphanGeometry()
Returns the ownership of a geometry to the caller.

Return
(IGLine2D*) The orphaned geometry

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Obtaining the Bounding Information

Use the functions in this group to obtain the bounding rectangle information for the object.


[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


Rendering the Line

Use the function in this group to draw the line to the given port.


[view class]
draw
public:
virtual void draw(IGrafPort&) const
Draws the ILine 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 the object in from the specified stream or write it out to it.


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

fromStream
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
Write the object out to the specified stream.

toStream
The stream that the object is written out to.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Testing Two Objects for Equality

Use this function to test the current ILine object against the given IMDrawable object for equality.


[view class]
operator ==
public:
virtual bool operator ==(const IMDrawable&) const
Tests this ILine 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 ILine and the argument have equal geometries and bundles.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Transforming the Object

Use the function in this group to change the line's shape or 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


ILine - Inherited Member Functions and Data

Inherited Public Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Public Data

Inherited Protected Functions

IMDrawable
IMGraphic
IMStreamable

Inherited Protected Data