IStatefulGrafPort

IStatefulGrafPort provides the ability to set the value of the substates individually. The IStatefulGrafPort class provides the ability to set the value of the substates individually. You cannot copy or copy construct objects of this class.


IStatefulGrafPort - Member Functions and Data by Group

Constructors & Destructor

Use the functions in this group to construct and destroy objects of class IStatefulGrafPort.


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

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IStatefulGrafPort
public:
IStatefulGrafPort(IBaseRootGrafPort* root)
This constructor creates a stateful grafport.
Use this constructor to create a stateful grafport from a root grafport.

root
A pointer to the root grafport.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Accessing the Port

Use the function in this group to access the stateful graphics port.


[view class]
portForStateUsage
public:
virtual const IGrafPort* portForStateUsage() const
Provides a more efficient way to get access to the port.

Return
A constant pointer to the grafPort.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Adopting and Releasing a Device Context

Use the functions in this group to assume and release ownership of a device context.


[view class]
adoptDeviceContext
Takes over the ownership of a device context without deleting any existing device context.
public:
void adoptDeviceContext(IPresSpaceHandle)
This function adopts ownership of a device context without deleting any existing device context. The device context is orphaned when this IStatefulGrafPort is destroyed.

hps
The device context to be adopted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
orphanDeviceContext
public:
IPresSpaceHandle orphanDeviceContext()
Relinquishes knowledge of, and responsibility for, the device context, returning it to the caller.

Return
The orphaned device context.

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.


[view class]
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 constant reference to the conversion matrix from pixel size to point size.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Inverting the Device Transformation

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


[view class]
invertedDeviceTransform
public:
virtual const IGrafMatrix& invertedDeviceTransform() const
Device tranformation matrix for inverting coordinates back to logical coordinate system.

Return
A constant reference to the inverted 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 in use or not.


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


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


Setting Graphics Port Substate Values

Use the functions in this group to set the graphics port substate bundle, clipping area, and matrix.


[view class]
setBundle
public:
void setBundle(const IGrafBundle& bundle)
Sets the attribute bundle for this grafPort.

bundle
A constant reference to the new attribute bundle.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setClipArea
public:
void setClipArea(const IGArea& clipArea)
Sets the clipping area for this stateful grafPort.

clipArea
A constant reference to the new clipping area

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setMatrix
public:
void setMatrix( EMatrixKind matrixKind, const IGrafMatrix& matrix )
Sets the transformation matrix for this graf port.

matrixKind
The matrix type.
matrix
A constant reference to the new matrix.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IStatefulGrafPort - Inherited Member Functions and Data

Inherited Public Functions

IGrafPort

Inherited Public Data

Inherited Protected Functions

IGrafPort

Inherited Protected Data