Polyline (C++)
Description
This example paints a white five-pointed star in a paintbox control.
Code
void __fastcall TForm1::PaintBox1Paint(TObject *Sender)
{
TPaintBox *pPB = dynamic_cast<TPaintBox *>(Sender);
TPoint points[6];
pPB->Canvas->Pen->Color = clWhite;
points[0].x = 40;
points[0].y = 10;
points[1].x = 20;
points[1].y = 60;
points[2].x = 70;
points[2].y = 30;
points[3].x = 10;
points[3].y = 30;
points[4].x = 60;
points[4].y = 60;
points[5].x = 40;
points[5].y = 10;
pPB->Canvas->Polyline(points,5);
}
Uses
- Vcl.ExtCtrls.TPaintBox.OnPaint ( fr | de | ja )
- Vcl.Graphics.TCanvas.Pen ( fr | de | ja )
- Vcl.Graphics.TCanvas.Polyline ( fr | de | ja )