Vcl.Direct2D.TDirect2DCanvas.Rectangle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Rectangle(X1, Y1, X2, Y2: Integer); override;

C++

virtual void __fastcall Rectangle(int X1, int Y1, int X2, int Y2)/* overload */;
inline void __fastcall  Rectangle(const System::Types::TRect &Rect){ Vcl::Graphics::TCustomCanvas::Rectangle(Rect); }

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.Direct2D.pas
Vcl.Direct2D.hpp
Vcl.Direct2D TDirect2DCanvas

Description

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.

See Also