FMX.Graphics.TCanvas.RestoreState

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RestoreState(const State: TCanvasSaveState);

C++

void __fastcall RestoreState(TCanvasSaveState* const State);

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics TCanvas

Description

Restores the drawing and filling properties of the TCanvas to a saved state.

RestoreState is implemented by TCanvas descendants to restore a previous saved state of the TCanvas.

Call RestoreState to restore the drawing and filling properties to values saved in previous moments of the drawing process.

The State parameter specifies the pointer to the saved data.

After the state is restored, the saved data are freed. If State is empty, RestoreState raises an exception.

To save the TCanvas state, call SaveState.

var
save :TCanvasSaveState;
begin
save:=MyCanvas.SaveState;
//properties customization
//....
RestoreState(save);

See Also

Code Example