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

TCanvas.FillRect

Fills a rectangular area on the canvas using the current Brush settings.

Declaration

Source position: graphics.pp line 1123

public procedure TCanvas.FillRect(

  const ARect: TRect

); virtual;

procedure TCanvas.FillRect(

  X1: Integer;

  Y1: Integer;

  X2: Integer;

  Y2: Integer

);

Arguments

ARect

  

TRect instance with the vertices for the rectangular area filled in the method.

Arguments

X1

  

Left coordinate for the Top, Left of the rectangle.

Y1

  

Top coordinate for the Top, Left of the rectangle.

X2

  

Right coordinate for the Bottom, Right of the rectangle.

Y2

  

Bottom coordinate for the Bottom, Right of the rectangle.

Description

FillRect is an overloaded method used to fill a rectangular area on the canvas using the style, color, or bitmap defined in Brush. The overloaded variants allow the vertices for the rectangle to be specified as either:

FillRect calls the routine in the LCL interface used to implement the method for a specific widgetset.

Use Rectangle to draw a filled rectangle with borders. Use FloodFill to fill a rectangular area bounded by a specified color value.

See also

TCanvas.Brush

  

The Brush used to paint on the Canvas.

TCanvas.FloodFill

  

Fills an area at the specified coordinates with the current Brush for the canvas.

TCanvas.Rectangle

  

Draws a Rectangle with the specified coordinates.

LCLIntf.FillRect

  

Fills a rectangle by using the specified brush.


Version 3.2 Generated 2024-02-25 Home