Registriert seit: 18. Dez 2002
38 Beiträge
Delphi 6 Personal
|
bitmap rotate beschleunigen
12. Jan 2003, 12:57
kann man diese procedure mit der APi noch beschleunigen?
Code:
procedure Rotate(Dest,Source:TBitmap;Angle:integer);
var i,j:integer;
begin
with Source.Canvas.ClipRect do begin
for i := Left to Right do begin
for j := Top to Bottom do begin
case Angle of
0: Dest.Canvas.Pixels[i,j]:= Source.Canvas.Pixels[i,j];
90: Dest.Canvas.Pixels[j,Right-i-1]:= Source.Canvas.Pixels[i,j];
180: Dest.Canvas.Pixels[Right-i-1,Bottom-j-1] := Source.Canvas.Pixels[i,j];
270: Dest.Canvas.Pixels[Bottom-j-1,i] := Source.Canvas.Pixels[i,j]
end;
end;
end;
end;
end;
|
|
Zitat
|