FMX.Objects.TRectangle
Delphi
TRectangle = class(TShape)
C++
class PASCALIMPLEMENTATION TRectangle : public TShape
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | FMX.Objects.pas FMX.Objects.hpp |
FMX.Objects | FMX.Objects |
Description
TRectangle defines 2D rectangles with customized corners. It inherits TControl and can be used in styles to construct controls.
The CornerType, XRadius, and YRadius properties define how to customize shapes of rectangle corners:
Corners specifies which corners to be customized.
Notice that, if Corners is an empty set or any of the XRadius or YRadius properties is zero, then no corner shape customization is used.
The rectangle size and position are defined by the following properties of the TRectangle object:
- The shape rectangle ShapeRect defines the initial size and position of the rectangle.
- You can use the rotation axis RotationCenter and rotation angle RotationAngle of the TRectangle object to rotate and move the rectangle.
- You can use the scaling factors of the TRectangle object to proportionally scale rectangle coordinates along local coordinate axes. Scaling moves the rectangle and changes its size.
- Note: Scaling not only scales the shape of an object proportionally to the scaling factors. It also changes the thickness of the stroke that draws the contour proportionally to the scaling factor for each axis.
TRectangle draws the contour and fills the background with the Paint method. Paint uses the drawing pen and brush with the properties, color, and opacity defined by the Stroke and Fill properties.
See Also
- FMX.Objects.TRectangle.Corners
- FMX.Objects.TRectangle.CornerType
- FMX.Objects.TRectangle.XRadius
- FMX.Objects.TRectangle.YRadius