Draws a rectangle on the canvas.
Use Rectangle to draw a rectangle using Pen and fill it with Brush. Specify the rectangle's coordinates in one of two ways:
• Giving four coordinates that define the upper left corner at the point (X1, Y1) and the lower right corner at the point (X2, Y2).
• Using a TRect type.
To fill a rectangular region without drawing the boundary in the current pen, use FillRect. To outline a rectangular region without filling it, use FrameRect or Polygon. To draw a rectangle with rounded corners, use RoundRect.
Tip |
---|
This FMX version of the method adds a default Opacity parameter at the end of the parameters. This allows you to take advantage of the FMX ability to draw transparently to the canvas. Alternatively, don't set this parameter and it works exactly like the VCL TCanvas method. |
Namespace: FMX.RS.CanvasHelper
Delphi |
public |
Parameters
X1
Type: Single
Y1
Type: Single
X2
Type: Single
Y2
Type: Single
Opacity
Type: Single