### IBaseRootGrafPort

  An IBaseRootGrafPort represents the top port of a port hierarchy. The IBaseRootGrafPort class represents the top port of a port hierarchy. IBaseRootGrafPort uses an ideal coordinate, which is expressed in point size (1/72 inch) to draw graphics. You cannot copy or copy construct objects of this class.

### IBaseRootGrafPort - Member Functions and Data by Group

### Constructors & Destructor

Use these functions to construct and destroy IBaseRootGrafPort objects.

~IBaseRootGrafPort

      public:
      virtual ~IBaseRootGrafPort()

  Destroys an IBaseRootGrafPort object.

Supported Platforms

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

IBaseRootGrafPort

      public:
      IBaseRootGrafPort( const IPresSpaceHandle& deviceContextToBeAdopted,
                         IColorMap* colormap = & ( IColorMap::defaultColorMap ( ) ) )

  Constructs an IBaseRootGrafPort object, which represents the top port of a port hierarchy.
  Use this constructor to create an IBaseRootGrafPort that adopts the given IPresSpaceHandle and IColorMap.

  deviceContextToBeAdopted
    The IPresSpaceHandle to be adopted.
  colormap
    The IColorMap to be adopted.

Supported Platforms

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

### Converting from Pixel to Pointsize

Use the functions in this group to convert coordinates from pixels to points.

pixelToPointSize

      public:
      virtual const IGrafMatrix& pixelToPointSize() const

  Converts from device coordinate which is in pixel to "ideal" coordinate which is in point size ( 1/72 inch).

Return
  Returns a conversion matrix from pixel size to point size.

Supported Platforms

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

### Defining a Coordinate System

Use the function in this group to set up the coordinate system for the top graphics port in a port hierarchy.

setupCoordinateSystem

      protected:
      void setupCoordinateSystem(int coordinateSystem)

  Sets up coordinate system. Default is left-hand coordinate system.

  coordinateSystem
    The specified coordinate system.

Supported Platforms

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

### Inverting the Device Transformation

Use the function in this group to invert the device transformation to its logical coordinate system.

invertedDeviceTransform

      public:
      virtual const IGrafMatrix& invertedDeviceTransform() const

  Inverts the device tranformation back to its logical coordinate system.

Return
  A constant reference to the inverted device transformation matrix.

Supported Platforms

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

### Marking the Graphics State

Use the functions in this group to mark the graphics state as either in use or not in use.

doneWithState

      public:
      virtual void doneWithState() const

  Marks the graphic state as being no longer in use so that changes to the state can be made.

Supported Platforms

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

useState

      public:
      virtual void useState() const

  Marks the graphic state as being in use so that no changes to the state are made until doneWithState is called.

Supported Platforms

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

### Obtaining Information About the Graphics Device

Use the function in this group to obtain the bounding rectangle of a graphics device.

worldBounds

      public:
      IGRect2D worldBounds() const

  Returns the bounding rectangle of the IGrafDevice in world coordinates.

Return
  The bounding rectangle.

Supported Platforms

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

### Obtaining IXDC information on AIX

Use the functions in this group to obtain IXDC information on AIX.

display

      public:
      virtual _XDisplay* display() const

  Gets the IXDC display information.

Supported Platforms

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

drawable

      public:
      virtual unsigned long drawable() const

  Gets the IXDC drawable information.

Supported Platforms

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

gc

      public:
      virtual _XGC* gc() const

  Gets the IXDC gc information.

Supported Platforms

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

### IBaseRootGrafPort - Inherited Member Functions and Data

#### Inherited Public Functions

  IGrafPort

  -     virtual ~IGrafPort()

  -     void adoptDeviceContext(IPresSpaceHandle)

  -     const IAttributeState* attributes() const

  -     const IGArea* clipArea() const

  -     virtual IGRect2D convertRect(const IRectangle) const

  -     virtual const IPresSpaceHandle& deviceContext()

  -     virtual void doneWithState() const = 0

  -     void
          draw( const IGImage& theImage,
                const IGImage& theMask,
                const IGRect2D& srcBounds )

  -     void
          draw( const IGPolyline2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGLine2D& geometry)

  -     void
          draw( const IGCurve2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGRect2D& geometry)

  -     void
          draw( const IGImage& theImage,
                const IGRect2D& srcBounds,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGImage& geometry, const IGImage& theMask)

  -     IGPoint2D draw(const IGTextRun& geometry)

  -     void
          draw( const IGRect2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGPolygon2D& geometry)

  -     void draw(const IGEllipse2D& geometry)

  -     void
          draw( const IGPolygon2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGPolyline2D& geometry)

  -     void draw(const IGArea& geometry)

  -     void
          draw( const IGLine2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void
          draw( const IGEllipse2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void
          draw( const IGImage& theImage,
                const IGImage& theMask,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void
          draw( const IGLoop2D& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void
          draw( const IGImage& theImage,
                const IGRect2D& srcBounds )

  -     void draw(const IGImage& geometry)

  -     void draw(const IGLoop2D& geometry)

  -     void
          draw( const IGArea& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void
          draw( const IGImage& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     IGPoint2D
          draw( const IGTextRun& geometry,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     void draw(const IGCurve2D& geometry)

  -     void
          draw( const IGImage& theImage,
                const IGImage& theMask,
                const IGRect2D& srcBounds,
                const IAttributeState& attributeState,
                const IGrafMatrix& modelMatrix = IGrafMatrix::identity ( ) )

  -     virtual void flush()

  -     const IGrafMatrix* matrix(EMatrixKind) const

  -     IPresSpaceHandle orphanDeviceContext()

  -     virtual const IGrafPort* portForStateUsage() const

  -     const IString* portType() const

  -     virtual void useState() const = 0

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IGrafPort

  -     void adoptOrphanedGrafState(IGrafState* orphan)

  -     IGrafDevice* device()

  -     IGrafPort( IGrafDevice* referencedDevice,
                   IColorMap* colormap = & ( IColorMap::defaultColorMap ( ) ) )

  -     IGrafPort()

  -     void setDevice(IGrafDevice* device)

  -     void setState(IGrafState* state)

  -     const IGrafState* state() const

#### Inherited Protected Data

  - None