Polygon (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example draws a polygon in the specified shape and fills it with the color teal.

Code

procedure TForm1.FormPaint(Sender: TObject);
begin
  Canvas.Brush.Color := clTeal;
  Canvas.Polygon([Point(10, 10), Point(30, 10),
    Point(130, 30), Point(240, 120)]);
end;

Uses