Graphic Component

The Graphic Component is used for drawing. It offers some primitive drawing operations: drawing of lines, rectangles, text and pixmaps.

Motivation

Mechanics

Figure 10-3. Graphic Component Class Diagram

Graphic Component Class Diagram

We use a simple OO interface which only offers the primitive drawing operations. Those parts of the code which should be independent of how something is drawn only use this interface for drawing. They must be initialized or called with the desired Graphic Component implementation.

For drawing with the GtkAda library there is an implementation of the Graphic Component called Gtk Graphic Component which is passed around when we want to draw on the display.