Table of Contents

TTMSFNCGraphics.SaveState Method

Saves the current graphics state (fill, stroke, font, and transform) and returns a token that can be passed to RestoreState to revert.

API unit family: TMSFNCGraphics Declaring type: TTMSFNCGraphics

Syntax

function SaveState(ACanvasOnly: Boolean = False): TTMSFNCGraphicsSaveState; virtual;

Parameters

Name Description
ACanvasOnly When True, saves only the canvas transform and clip state, leaving fill, stroke, and font unchanged on restore. Default is False.

Returns

A TTMSFNCGraphicsSaveState token encapsulating the saved state.