TFPCustomCanvas.Erase: swap x-loop and y-loop
Copy/paste from https://forum.lazarus.freepascal.org/index.php/topic,62788.0.html
packages/fcl-image/src/fpcanvas.inc contains the following procedure:
procedure TFPCustomCanvas.Erase;
var
x,y:Integer;
begin
for x:=0 to Width-1 do
for y:=0 to Height-1 do
Colors[x,y]:=colTransparent;
end;
The following procedure should be faster. I've switched the for loops.
procedure TFPCustomCanvas.Erase;
var
x,y:Integer;
begin
for y:=0 to Height-1 do
for x:=0 to Width-1 do
Colors[x,y]:=colTransparent;
end;