Fixed QZoomImage for big window areas, with zoom>1.
authorviric@llimona
Thu, 15 Nov 2007 19:44:46 +0100
changeset 217 c67d7bca3bf0
parent 216 95cdc556c93f
child 218 78090396963c
Fixed QZoomImage for big window areas, with zoom>1.
qjpeg/gui/QZoomImage.cpp
--- a/qjpeg/gui/QZoomImage.cpp	Thu Nov 15 19:24:24 2007 +0100
+++ b/qjpeg/gui/QZoomImage.cpp	Thu Nov 15 19:44:46 2007 +0100
@@ -181,7 +181,7 @@
     };
     if ((image->width() - s.offsetx)*expand < width())
     {
-        bsource.right = image->width()/expand;
+        bsource.right = image->width();
         btarget.right = (image->width() - s.offsetx)*expand;
     } else
     {
@@ -201,14 +201,17 @@
     }
     if ((image->height() - s.offsety)*expand < height())
     {
-        bsource.bottom = image->height()/expand;
+        bsource.bottom = image->height();
         btarget.bottom = (image->height() - s.offsety)*expand;
     } else
     {
         bsource.bottom = s.offsety + height()/expand;
         btarget.bottom = height();
     }
-    //showBorders();
+    /*
+    qDebug("s.ox: %i s.oy: %i", s.offsetx, s.offsety);
+    showBorders();
+    */
 }
 
 void QZoomImage::showBorders()