Figure 22
shows the class relationships for MGraphic and MDrawable and lists the MGraphic member functions described in this chapter. MDrawable has a pure virtual Draw function that is implemented in the MGraphic derived classes. You typically call the Draw function from the TView::DrawContents function to draw into a view and the View system passes the correct TGrafPort to the DrawContents function. Chapter 2 has several DrawContents implementations.
The MGraphic constructors are protected and used only when you derive from MGraphic to create a custom 2-D graphic. See Chapter 11 for information on creating customized 2-D graphics.