Browse Source

* Patch from bug #18460

git-svn-id: trunk@16745 -
michael 14 years ago
parent
commit
673497d15b
1 changed files with 8 additions and 8 deletions
  1. 8 8
      packages/fcl-image/src/fpcanvas.inc

+ 8 - 8
packages/fcl-image/src/fpcanvas.inc

@@ -582,16 +582,16 @@ end;
 
 procedure TFPCustomCanvas.CopyRect (x,y:integer; canvas:TFPCustomCanvas;
   SourceRect:TRect);
-var xx,r,t : integer;
+var yy,r,t : integer;
 begin
   SortRect (SourceRect);
-  with SourceRect do
-    for r := left to right do
-      begin
-      xx := r - left + x;
-      for t := bottom to top do
-        colors[xx,(t - bottom + y)] := canvas.colors[r,t];
-      end;
+  with SourceRect do begin
+    for t := top to bottom do begin
+      yy := t - top + y;
+      for r := left to right do
+        colors[r - left + x,yy] := canvas.colors[r,t];
+    end;
+  end;
 end;
 
 procedure TFPCustomCanvas.Draw (x,y:integer; image:TFPCustomImage);