Accessing canvas graphics

Clients of MCanvasRepresentation use the canvas graphic ID to access canvas graphics in the representation and call the canvas graphic's member functions. All canvas representation functions that refer to the canvas graphics in the representation use the canvas graphic ID; however, to adopt new canvas graphics into the representation, functions use pointers. As shown in Figure 31, MCanvasRepresentation has functions to identify whether a graphic is a member of the representation, and functions to look up the pointer of a canvas graphic in the representation from its ID.


The Lookup function has two declarations, one is constant and returns a constant MCanvasGraphic, and the other is non-constant and returns a nonconstant MCanvasGraphic.

      virtual const MCanvasGraphic* Lookup( const TCanvasGraphicID& ) const = 0;
      virtual MCanvasGraphic* Lookup( const TCanvasGraphicID& ) = 0;

[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