[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 689

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 From argument is another Brush, frees reference before calling inherited method, then sets the Changed property.

  procedure SetColor();

  

Sets the value for the Color property.

  procedure SetFPColor(); override;

  

Sets the Brush color to the specified TFPColor value.

  procedure SetBitmap();

  

Sets the value for the Bitmap property.

  procedure SetStyle(); override;

  

Sets the value for the Style property.

public

  procedure Assign(); override;

  

Copies values from Source to the current brush instance.

  constructor Create; override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destructor for the class instance.

  function EqualsBrush();

  

Compares the specified Brush to the current class instance.

  property Bitmap: TCustomBitmap; [rw]

  

Bitmap with the pattern for the Brush.

  property Handle: HBRUSH; [rw] deprecated ;

  

Operating System handle for the brush.

  property Reference: TWSBrushReference; [r]

  

Contains a Reference to the handle allocated for the Brush.

published

  property Color: TColor; [rw]

  

The Color of the current Brush.

  property Style;

  

Indicates the pattern drawn for 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 the Canvas with one particular color or colored pattern.