Accessing the canvas representation

All graphics referenced by a selection are owned by a single canvas representation. This canvas representation can be accessed by calling MCanvasSelection::GetCanvasRepresentation. Commands that produce global changes to the representation rather than to the canvas selection, use this function to return the MCanvasRepresentation. For example, TAdoptCanvasCmd uses the MCanvasSelection::GetCanvasRepresentation to adopt a canvas graphic into the representation. TCommandOn derived classes use MCanvasSelection::GetCanvasRepresentation to implement the undo operation by swapping a saved graphic into the representation in place of an existing canvas graphic. Undo and redo are described in Chapter 7, "Commands, interactors, and cursor tools".

      virtual MCanvasRepresentation* GetCanvasRepresentationForReading() = 0;
      virtual MCanvasRepresentation* GetCanvasRepresentationForWriting() = 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