TcxCanvas.Rectangle(TRect,TcxViewParams,TcxBorders,TColor,Integer,Boolean) Method
In This Article
Draws a rectangle on the canvas.
#Declaration
Delphi
procedure Rectangle(R: TRect; const AParams: TcxViewParams; const ABorders: TcxBorders = cxBordersAll; ABorderColor: TColor = clDefault; ALineWidth: Integer = 1; AExcludeRect: Boolean = False); overload;
#Parameters
Name | Type |
---|---|
R | TRect |
AParams | Tcx |
ABorders | Tcx |
ABorder |
TColor |
ALine |
Integer |
AExclude |
Boolean |
#Remarks
Call any of the overloaded procedure variants to draw a rectangle on the canvas.
Overloaded Variant | Description |
---|---|
1 | This overloaded variant uses the Brush and Pen settings to draw a target rectangle passed as the R parameter. |
2 | This variant works similarly to the first variant but accepts the coordinates of the left-top and right-bottom corners of the target rectangle as the X1, Y1, X2, and Y2 parameters. |
3 | This procedure variant accepts the target rectangle and new brush settings as the R and AParams parameters, respectively. You can pass the outline width and color as the optional ABorder |
4 | This overloaded variant accepts the target rectangle as the R parameter. Pass fill and outline colors as the ABrush |
See Also