self.Image1.Bitmap:= TBitmap.Create(Round(Image1.Width), Round(Image1.Height));
self.Image1.Bitmap.Canvas.BeginScene;
self.Image1.Bitmap.Canvas.Clear(TAlphaColorRec.Black); self.Image1.Bitmap.Canvas.Stroke.Color:= TAlphaColorRec.White; self.Image1.Bitmap.Canvas.DrawLine(TPointF.Create(0,0),TPointF.Create(100,100),1); self.Image1.Bitmap.Canvas.EndScene;