TRectangle = class(TShape)
class PASCALIMPLEMENTATION TRectangle : public TShape
TRectangle defines 2D rectangles with customized corners. It inherits TControl and can be used in styles to construct controls.
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 scaling factors to 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, but also changes the StrokeThickness of the contour proportionally to the scaling factor for each axis.
- You can use the rotation axis RotationCenter and rotation angle RotationAngle of the TRectangle object to rotate and move the rectangle.
- The Corners, CornerType, XRadius, and YRadius properties customize the shape of the rectangle corners.
TRectangle draws the contour and fills the background with the Paint method.
Paint draws the contour and fills the background using the drawing pen and brush with the properties, color, and opacity defined by the Stroke, StrokeThickness, StrokeCap, StrokeDash, StrokeJoin, and Fill properties of the TRectangle object.