TImageCanvas (C++)
Description
The following example paints a cross-hatched ellipse onto Image1, which is a TImage on the form when you click Button1.
Code
void __fastcall TForm1::Button1Click(TObject *Sender)
{
TCanvas *pCanvas = Image1->Canvas;
pCanvas->Brush->Color = clRed;
pCanvas->Brush->Style = bsDiagCross;
pCanvas->Ellipse(0, 0, Image1->Width, Image1->Height);
}
Uses
- Vcl.ExtCtrls.TImage.Canvas ( fr | de | ja )
- Vcl.Graphics.TCanvas.Ellipse ( fr | de | ja )
- Vcl.Graphics.TBrush.Color ( fr | de | ja )
- Vcl.Graphics.TBrush.Style ( fr | de | ja )