[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'FPCanvas' (#fcl)

# TFPCanvasHelper

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TFPCanvasHelper - FreePascal base class providing utilities for drawing and painting canvases

## Declaration

Source position: fpcanvas.pp line 36

`type TFPCanvasHelper = class(TPersistent)`
`protected`
`function GetAllocated; virtual;` |  | GetAllocated returns True if the canvas is allocated (assigned)
`procedure SetFlags(); virtual;` |  | SetFlags - stores specified boolean values in index-nominated flags
`function GetFlags(); virtual;` |  | GetFlags - returns the boolean value of the specified flag
`procedure CheckAllocated();` |  | CheckAllocated - check whether the canvas is allocated, and if ValueNeeded if True, raises an exception if not allocated
`procedure SetFixedCanvas();` |  | SetFixedCanvas - specifies whether the canvas is to be fixed
`procedure DoAllocateResources; virtual;` |  | DoAllocateResources - procedure for allocating resources
`procedure DoDeAllocateResources; virtual;` |  | DoDeAllocateResources - procedure for deallocationg resources
`procedure DoCopyProps(); virtual;` |  | DoCopyProps - copies properties from another Canvas Helper
`procedure SetFPColor(); virtual;` |  | SetFPColor - specify the colour using the FreePascal list
`procedure Changing; dynamic;` |  | Changing - software emulation of a call to the OnChanging event
`procedure Changed; dynamic;` |  | Changed - software emulation of a call to the OnChange event
`procedure Lock;` |  | Lock the canvas so it can't be changed
`procedure UnLock;` |  | UnLock a previously locked canvas
`public`
`constructor Create; virtual;` |  | Create - constructor for TFPCanvasHelper: calls inherited Create then sets properties Canvas to nil, FixedCanvas and Allocated to False
`destructor Destroy; override;` |  | Destroy - destructor for TFPCanvasHelper: de-allocates resources then calls inherited Destroy
`procedure AllocateResources();` |  | AllocateResources - prepare helper for use
`procedure DeallocateResources;` |  | DeallocateResources - free all resources used by this helper
`property Allocated: Boolean; [r]` |  | If True, then helper has been Allocated
`property FixedCanvas: Boolean; [r]` |  | FixedCanvas - properties cannot be changed when allocated
`property Canvas: TFPCustomCanvas; [r]` |  | Canvas for which the helper is allocated
`property FPColor: TFPColor; [rw]` |  | FPColor - colour of the helper
`property OnChanging: TNotifyEvent; [rw]` |  | OnChanging - event handler while change is occurring
`property OnChange: TNotifyEvent; [rw]` |  | OnChange - event handler when a change has occurred
`property DelayAllocate: Boolean; [rw]` |  | DelayAllocate - if True, then allocation is to be delayed
`end;`

## Inheritance

`TFPCanvasHelper` |  | TFPCanvasHelper - FreePascal base class providing utilities for drawing and painting canvases
`TPersistent`
`TObject`

The latest version of this document can be found at lazarus-ccr.sourceforge.net.