FMX.Graphics.TCanvas.FillRect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;  const AOpacity: Single; const ACornerType: TCornerType = TCornerType.Round); overload;
procedure FillRect(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;  const AOpacity: Single; const ABrush: TBrush; const ACornerType: TCornerType = TCornerType.Round); overload;
procedure FillRect(const ARect: TRectF; const AOpacity: Single); overload;
procedure FillRect(const ARect: TRectF; const AOpacity: Single; const ABrush: TBrush); overload;

C++

void __fastcall FillRect(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 FillRect(const System::Types::TRectF &ARect, const float XRadius, const float YRadius, const Fmx::Types::TCorners ACorners, const float AOpacity, TBrush* const ABrush, const Fmx::Types::TCornerType ACornerType = (Fmx::Types::TCornerType)(0x0))/* overload */;
void __fastcall FillRect(const System::Types::TRectF &ARect, const float AOpacity)/* overload */;
void __fastcall FillRect(const System::Types::TRectF &ARect, const float AOpacity, TBrush* const ABrush)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics TCanvas

Description

Fills a rectangle with customized corners on the current TCanvas.

FillRect is implemented by TCanvas descendants to fill--with the current brush specified by the Fill property or with the brush specified by the ABrush parameter--the ARect rectangle with customized shapes of corners.

ARect specifies the rectangle to be filled.

XRadius specifies the distance from a corner to the start point of the customization on horizontal sides. The maximum value of XRadius is half of the ARect rectangle's width.

YRadius specifies the distance from a corner to the start point of the customization on vertical sides. The maximum value of YRadius is half of the ARect 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 Fill or ABrush color.

ABrush specifies the TBrush color and pattern to use for filling the rectangle.

ACornerType specifies the TCornerType type of corner shapes' customization. It is an optional parameter with a default value of Round.

DrawRectCanvas.png


See Also

Code Examples