Okay, how do you feel about painting whites squares on a black background?
procedure TForm3.Button1Click(Sender: TObject);
var PD: TPathData;
r,c: Integer;
begin
ImageControl1.Bitmap.SetSize(Round(ImageControl1.BoundsRect.Width), Round(ImageControl1.BoundsRect.Height));
if ImageControl1.Bitmap.Canvas.BeginScene then
try
with ImageControl1.Bitmap.Canvas do
begin
Clear(TAlphaColorRec.Black);
Fill.Kind := TBrushKind.Solid;
Fill.Color := TAlphaColorRec.White;
Stroke.Thickness := 2;
PD := TPathData.Create;
for r := 0 to 3 do begin
for c := 0 to 3 do begin
PD.MoveTo(PointF(c * 90 + 10, r * 90 + 10));
PD.HLineToRel(80);
PD.VLineToRel(80);
PD.HLineToRel(-80);
PD.ClosePath;
end;
end;
DrawPath(PD,1);
FillPath(PD,1);
PD.Free;
end;
finally
ImageControl1.Bitmap.Canvas.EndScene;
end;
end;