Polyline (Delphi)
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
- Vcl.ExtCtrls.TPaintBox.OnPaint ( fr | de | ja )
- Vcl.Graphics.TCanvas.Pen ( fr | de | ja )
- Vcl.Graphics.TCanvas.Polyline ( fr | de | ja )