Sign in Join
FPDoc Onlineexperiment

TLazCanvas.SaveState function

Member of TLazCanvaspublicIn unit LazCanvas

Saves the current canvas state in the GraphicStateList member.

Declaration

pascal
function SaveState: Integer

Function result

Ordinal position in GraphicStateList where the saved canvas state was stored.

Description

SaveState is an Integer function used to save the current canvas state in the GraphicStateList member. SaveState creates an instance of TLazCanvasState with copies of the current values for Brush, Pen, and Font. Values from BaseWindowOrg, WindowOrg, and Clipping are also assigned to the class instance.

The return value contains the ordinal position in GraphicStateList where the canvas state was added in the method.

Use RestoreState to restore the canvas to the state stored at a specified position in the list.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.