There are 3 more places in the code where the low-res pixel size needs to be used.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 31 Jan 2008 14:11:58 +0000 (14:11 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 31 Jan 2008 14:11:58 +0000 (14:11 +0000)
git-svn-id: http://svn.voria.com/code@1530 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/workarea.cpp

index 8924d12..5c6200d 100644 (file)
@@ -474,7 +474,10 @@ public:
                assert(workarea);
                newdesc->set_flags(RendDesc::PX_ASPECT|RendDesc::IM_SPAN);
                if(low_res)
-                       newdesc->set_wh(w/2,h/2);
+               {
+                       int div = 1 << workarea->get_lowrespixel();
+                       newdesc->set_wh(w/div,h/div);
+               }
                else
                        newdesc->set_wh(w,h);
 
@@ -557,8 +560,9 @@ public:
                        int th=workarea->tile_h;
                        if(low_res)
                        {
-                               tw/=2;
-                               th/=2;
+                               int div = 1 << workarea->get_lowrespixel();
+                               tw/=div;
+                               th/=div;
                        }
                        for(int i=0;i<x;i++)
                                dest=Color2PixelFormat(
@@ -589,9 +593,10 @@ public:
                if(low_res)
                {
                        // We need to scale up
+                       int div = 1 << workarea->get_lowrespixel();
                        pixbuf=pixbuf->scale_simple(
-                               surface.get_w()*2,
-                               surface.get_h()*2,
+                               surface.get_w()*div,
+                               surface.get_h()*div,
                                Gdk::INTERP_NEAREST
                        );
                }