TCanvas.FillRect procedure
Fills a rectangular area on the canvas using the current Brush settings. No border line is painted.
Declaration
procedure FillRect(const ARect: TRect); virtual; reintroduce
procedure FillRect(X1: Integer; Y1: Integer; X2: Integer; Y2: Integer)
; reintroduceArguments
ARect | TRect instance with the vertices for the rectangular area filled in the method. |
X1 | Coordinate of the left side of the rectangle. |
Y1 | Coordinate of the top side of the rectangle. |
X2 | Coordinate of the right side of the rectangle. |
Y2 | Coordinate of the bottom side 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 border
of the rectangle is not drawn. The overloaded variants allow the vertices for
the rectangle to be specified as either:
- Four separate Integer coordinates representing the top/left and bottom/right sides of the shape.
- A TRect instance where the vertices are represented as either four Integers, two TPoint instances for TopLeft and BottomRight, or a vector using the TArray4IntegerType.
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 an area (not necessarily rectangular) bounded by a specified color value.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
