Polyline (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example paints a white five-pointed star in a paintbox control.

Code

procedure TForm1.PaintBox1Paint(Sender: TObject);
begin
  with Sender as TPaintBox do
  begin
    Canvas.Pen.Color := clWhite;
    Canvas.Polyline([Point(40, 10), Point(20, 60), Point(70, 30),
    Point(10, 30), Point(60, 60), Point(40, 10)]);
  end;
end;

Uses