[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TBrush

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

The Brush to be used to Paint on the current Canvas

## Declaration

Source position: graphics.pp line 660

`type TBrush = class(TFPCustomBrush)`
`protected`
`procedure DoAllocateResources; override;` |  | DoAllocateResources - calls inherited method then calls GetReference
`procedure DoDeAllocateResources; override;` |  | DoDeAllocateResources - frees reference then calls inherited method
`procedure DoCopyProps(); override;` |  | DoCopyProps - if the Fromargument is another Brush, frees reference before calling inherited method, then sets the Changed property
`procedure SetColor();` |  | SetColor - specify Colour for the Brush
`procedure SetFPColor(); override;` |  |
`procedure SetBitmap();` |  | SetBitmap - specify the Bitmap for the Brush
`procedure SetStyle(); override;` |  |
`public`
`procedure Assign(); override;` |  | Assign - if Source is another TBrush, copies settings to itself, else performs inherited Assign
`constructor Create; override;` |  | Create - constructor for TBrush: perform inherited Create then initialise some local variables and SetStyle
`destructor Destroy; override;` |  | Destroy - destructor for TBrush: free reference then perform inherited Destroy
`property Bitmap: TCustomBitmap; [rw]` |  | The BitMap associated with the current Brush
`property Handle: HBRUSH; [rw]` |  | Operating System Handle for this Brush
`property Reference: TWSBrushReference; [r]` |  | A Reference made to the current Brush
`published`
`property Color: TColor; [rw]` |  | The Colour of the current Brush
`property Style;` |  | Style of the Brush
`end;`

## Inheritance

`TBrush` |  | The Brush to be used to Paint on the current Canvas
`TFPCustomBrush`
?
`TObject`

## Description

A Brush is typically used to fill an enclosed area on theCanvas with one particular colour or coloured pattern

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