### Special GrafPorts in Open Class

By default the current coordinate system for the 2D Graphics framework is left-handed. In order to support dual coordinate systems and multiple mapping modes inherently for existing OpenClass clients, IExtendedRootGrafPort subclasses or extends IBaseRootGrafPort.

For traditional Cartesian coordinate system (used in OS/2 GPI), use the kRightHand parameter.

class IExtendedRootGrafPortPort : public IBaseRootGrafPort {
public:
IExtendedRootGrafPortPort(
IPresSpaceHandle adoptedDeviceContext,
EDeviceCoordinateSystem = kLeftHand,
EDeviceMappingMode = kPixel);
};

The enum type EDeviceMappingMode defines the modes of device mapping: kPixel, kLowMetric, kHighMetric, kLowEnglish, kHighEnglish, kTwips.

Also for convenience, a subclass of IExtendedRootGrafPort, IRootGrafPort is provided. The coordinate system in IRootGrafPort is upperLeft only.

By default, IExtendedRootGrafPort and IRootGrafPort are pixel-based. All graphics on screen, except text, are drawn in pixels when an IExtendedRootGrafPort or IRootGrafPort is used. When using either of these GrafPorts, text is always drawn in world_coordinate units.

GrafPorts