Show: Delphi C++
Display Preferences

FMX.Graphics.TCanvas.DrawRectSides

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;  const AOpacity: Single; const ASides: TSides; const ACornerType: TCornerType = TCornerType.Round); overload;
procedure DrawRectSides(const ARect: TRectF; const XRadius, YRadius: Single; const ACorners: TCorners;  const AOpacity: Single; const ASides: TSides; const ABrush: TStrokeBrush; const ACornerType: TCornerType = TCornerType.Round); overload;

C++

void __fastcall DrawRectSides(const System::Types::TRectF &ARect, const float XRadius, const float YRadius, const Fmx::Types::TCorners ACorners, const float AOpacity, const Fmx::Types::TSides ASides, const Fmx::Types::TCornerType ACornerType = (Fmx::Types::TCornerType)(0x0))/* overload */;
void __fastcall DrawRectSides(const System::Types::TRectF &ARect, const float XRadius, const float YRadius, const Fmx::Types::TCorners ACorners, const float AOpacity, const Fmx::Types::TSides ASides, 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 the specified sides of a rectangle with customized shapes of corners on the current TCanvas.

DrawRectSides draws the specified ASides sides of the ARect rectangle with customized shapes of corners, with the current Stroke or with the specified ABrush pen.

ARect specifies the rectangle to be drawn.

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 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 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 the corners, use the AllCorners constant.

AOpacity specifies the transparency of the Stroke or ABrush color.

ASides specifies the rectangle's sides to be drawn. If two adjacent sides are not drawn, and the corner between them is customized, the customization of the corner is displayed. If ASides is empty, DrawRectSides draws the customized corners, if they are defined. To display all the sides, use the AllSides constant.

ABrush specifies the TStrokeBrush pen to use for drawing sides of the rectangle.

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

DrawRectCanvas.png

To customize the drawing pen, use the Stroke, StrokeThickness, StrokeCap, StrokeDash, and StrokeJoin properties.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance