Drawing Directly to the Device

The following pseudocode is an example of how an application can use this approach to create a red line with the 2D Graphics framework:
{
... create a displayPort - an instance of IGrafPort...
// Creates a line
IGLine2D line(IGPoint2D(0.0, 0.0), IGPoint2D(1.0, 1.0));
// Creates a red color bundle
IGrafBundle redColor(IBasicColor(1.0, 0.0, 0.0));
//Render the line on to the GrafPort
displayPort->draw(line, redColor);
}