You've already forked lazarus-ccr
Scale performance is perfectly improved.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2204 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -793,8 +793,6 @@ begin
|
|||||||
iw := 1;
|
iw := 1;
|
||||||
if ih = 0 then
|
if ih = 0 then
|
||||||
ih := 1;
|
ih := 1;
|
||||||
Dest.Width := dw;
|
|
||||||
Dest.Height := dh;
|
|
||||||
if dw > aWidth then
|
if dw > aWidth then
|
||||||
begin
|
begin
|
||||||
xlen := Min(aWidth + Posx, dw);
|
xlen := Min(aWidth + Posx, dw);
|
||||||
@ -815,24 +813,30 @@ begin
|
|||||||
ylen := dh;
|
ylen := dh;
|
||||||
ypos := 0
|
ypos := 0
|
||||||
end;
|
end;
|
||||||
|
if dw > aWidth then
|
||||||
|
dw := aWidth;
|
||||||
|
if dh > aHeight then
|
||||||
|
dh := aHeight;
|
||||||
|
Dest.Width := dw;
|
||||||
|
Dest.Height := dh;
|
||||||
m := ypos div ih;
|
m := ypos div ih;
|
||||||
n := xpos div iw;
|
n := xpos div iw;
|
||||||
for i := ypos to ylen - 1 do
|
for i := ypos to ylen - 1 do
|
||||||
begin
|
begin
|
||||||
LScan1 := Dest.Scanline[i];
|
LScan1 := Dest.Scanline[i - ypos];
|
||||||
LScan2 := Src.Scanline[m];
|
LScan2 := Src.Scanline[m];
|
||||||
if (i mod ih) = 0 then
|
if (i mod ih) = 0 then
|
||||||
m := m + 1;
|
m := m + 1;
|
||||||
k := n;
|
k := n;
|
||||||
for j := xpos to xlen - 1 do
|
for j := xpos to xlen - 1 do
|
||||||
begin
|
begin
|
||||||
LScan1[j] := LScan2[k];
|
LScan1[j - xpos] := LScan2[k];
|
||||||
if (j mod iw) = 0 then
|
if (j mod iw) = 0 then
|
||||||
k := k + 1;
|
k := k + 1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Dest.InvalidateScanLine;
|
Dest.InvalidateScanLine;
|
||||||
ACanvas.Draw(NewLeft, NewTop, Dest);
|
ACanvas.Draw(NewLeft + posx, NewTop + posy, Dest);
|
||||||
Dest.Free;
|
Dest.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user