The Text and International Frameworks use the Unicode-based class IText as the storage mechanism for underlying text. The text can contain a mixture of runs of different character- and paragraph-styling information.
IGraphicText lets you display a single line of styled text as a static graphic object.
The most straightforward mechanism for drawing the styled text represented in an instance of IText is provided by IGraphicText. IGraphicText implements functions inherited from IMGraphic for drawing, performing graphic transformations, and computing the bounds of the graphic in a device-specific manner.
IGraphicText also provides access functions for the text and for the current transform.
This figure shows the IGraphicText interface:

This figure shows IGraphicText and related classes:

You can specify an IGPoint2D object to represent the anchor position at which to draw the text. For English text, the origin is at the left baseline, as illustrated in the following figure:

To draw the text, you specify the IGrafPort into which to display the text. For example, this code demonstrates simple usage of IGraphicText:
void drawSomeText (const IText& styledText,
IGPoint2D anchorLocation,
IGrafPort* displayPort)
{
IGraphicText graphicText(styledText, IGraphicText::kSingleLine);
graphicText.setLocation(anchorLocation);
graphicText.draw(*displayPort);
}
The text display classes consist of the following classes:
| Class | Description |
|---|---|
| IGraphicText | Lets you draw styled Unicode text strings as static graphics |
![]()
Graphics Class
Architecture
GrafPorts
IMGraphic Models