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

~ILine

      public:
      virtual ~ILine()

  Destroys the ILine object.

Supported Platforms

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

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.

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.

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.

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.

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

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.

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

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.

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

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.

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.

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

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

  -     IMDrawable(const 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