Canvas graphic derived classes

Figure 24 shows the MCanvasGraphic derived classes, which represent concrete shapes such as lines and ellipses. Concrete canvas graphics are adopted by the canvas representation, described under "Canvas representation" on page 111.

TBasicCanvasGraphic is constructed from any MGraphic. You can use this class to construct graphics such as rectangles and ellipses, and to act as a wrapper for any MGraphic that you want to incorporate into your GrafEdit application. If you derive from MCanvasGraphic to create your own canvas graphic, you must override the MCanvasGraphic HandleDraw, HandleGetBounds, HandleHit, HandleCreateInteractor, and HandleCreateFeedbacker. These classes are described later in this section.

The TSRTBoxFeedbacker canvas graphic is described under "Selection feedback graphic" on page 106.


Basic canvas graphic constructors

      TBasicCanvasGraphic( const MGraphic* adoptGraphicToRepresent );
      TBasicCanvasGraphic( const MGraphic& theGraphicToRepresent );
      TBasicCanvasGraphic( const TBasicCanvasGraphic& );
    TBasicCanvasGraphic();
TBasicCanvasGraphic constructors take an MGraphic or another TBasicCanvasGraphic as a parameter. Use TBasicCanvasGraphic to create canvas graphics from MGraphic derived classes at run time.

Shape classes constructors

      TCanvasPolygon( const TGPolygon& aPolygonGeometry );
      TCanvasPolygon( const TCanvasPolygon& aPolygonCanvasGraphic );
The canvas graphic-shape class constructors take the relevant geometry or another canvas graphic derived class of the same type as a parameter.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker