This class holds a reference to a Canvas
object and saves its current state. Later, the saved state of the Canvas
object can be retrieved by calling the Retrieve
method or automatically when the TCanvasRecall
instance is destroyed.
In addition to the properties of the TObject
class, the TCanvasRecall
class has the following property:
-
public Reference: TCanvas
The reference to aCanvas
object that is managed by this instance. This property can benil
.By changing this property, the
TCanvasRecall
instance restores the state of the previousCanvas
object and saves the state of the new one.
In addition to the methods of the TObject
class, the TCanvasRecall
class defines or overrides the following public methods:
-
constructor Create(AReference: TCanvas);
Creates an instance of the class and saves the state of theCanvas
object specified by the parameter.Parameter Description AReference The Canvas
object that should be managed by this instance (can benil
) -
destructor Destroy; override;
Restores the saved state of theCanvas
object and destroys the instance. -
procedure Store;
Saves the current state of theCanvas
object. -
procedure Retrieve;
Restores the saved state of theCanvas
object.