FMX.Graphics.TCanvas.DrawRect
Delphi
procedure DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ACornerType: TCornerType = TCornerType.Round); overload;
procedure DrawRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners; const AOpacity: Single; const ABrush: TStrokeBrush; const ACornerType: TCornerType = TCornerType.Round); overload;
C++
void __fastcall DrawRect(const System::Types::TRectF &ARect, const float XRadius, const float YRadius, const Fmx::Types::TCorners ACorners, const float AOpacity, const Fmx::Types::TCornerType ACornerType = (Fmx::Types::TCornerType)(0x0))/* overload */;
void __fastcall DrawRect(const System::Types::TRectF &ARect, const float XRadius, const float YRadius, const Fmx::Types::TCorners ACorners, const float AOpacity, TStrokeBrush* const ABrush, const Fmx::Types::TCornerType ACornerType = (Fmx::Types::TCornerType)(0x0))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TCanvas |
Description
Draws a rectangle with customized shapes of corners on the current TCanvas.
DrawRect is implemented by TCanvas descendants to draw the ARect
rectangle with customized corners, with the current Stroke or with the specified ABrush
pen.
ARect
specifies the rectangle to be drawn.
XRadius
specifies the distance from a rectangle corner to the start point of the customization on horizontal sides. The maximum value of XRadius
is half of the rectangle's width.
YRadius
specifies the distance from a rectangle corner to the start point of the customization on vertical sides. The maximum value of YRadius
is half of the rectangle's height.
ACorners
specifies the corners to apply the customization to. ACorners
can contain a set of constants defined in the TCorner type: TopLeft
, TopRight
, BottomLeft
, and BottomRight
. To apply the customization to all corners, use the AllCorners constant.
AOpacity
specifies the transparency of the Stroke or ABrush
color.
ABrush
specifies the TStrokeBrush pen to use for drawing a shape on the rectangle.
ACornerType
specifies the TCornerType type of corner shapes' customization. It is an optional parameter with a default value of Round
.
To customize the drawing pen, use the Stroke, Thickness, Cap, Dash, and Join properties.
See Also
- System.Types.TRectF
- FMX.Graphics.TStrokeBrush
- FMX.Graphics.TCanvas.DrawBitmap
- FMX.Graphics.TCanvas.DrawArc
- FMX.Graphics.TCanvas.DrawEllipse
- FMX.Graphics.TCanvas.DrawLine
- FMX.Graphics.TCanvas.DrawPath
- FMX.Graphics.TCanvas.DrawPolygon
- FMX.Graphics.TCanvas.DrawRectSides
- FMX.Graphics.TCanvas.FillRect
- FMX.Graphics.TCanvas.Stroke
- FMX.Graphics.TStrokeBrush.Cap
- FMX.Graphics.TStrokeBrush.Dash
- FMX.Graphics.TStrokeBrush.Join
- FMX.Graphics.TStrokeBrush.Thickness
- FMX.Graphics.TStrokeBrush
- FMX.Types.TCornerType
- FMX.Types.TCorners
- FMX.Types.AllCorners