Fix 1824437: studio occasionally renders the tiles in the wrong places. This was...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 14 Jan 2008 18:01:25 +0000 (18:01 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 14 Jan 2008 18:01:25 +0000 (18:01 +0000)
git-svn-id: http://svn.voria.com/code@1362 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 0901bff..26f62c8 100644 (file)
@@ -151,7 +151,7 @@ Renderer_Canvas::render_vfunc(
        }
        else
        {
-               const int width_in_tiles(w/tile_w+(w%tile_w?1:0));
+               const int width_in_tiles(w/tile_w+(((get_work_area()->get_low_resolution_flag())?((w/2)%(tile_w/2)):(w%tile_w))?1:0));
                const int height_in_tiles(h/tile_h+(h%tile_h?1:0));
 
                int u(0),v(0),tx,ty;
index 2f00672..6e31a6e 100644 (file)
@@ -1976,7 +1976,7 @@ WorkArea::next_unrendered_tile(int refreshes)const
                x(focus_point[0]/pw+drawing_area->get_width()/2-w/2),
                y(focus_point[1]/ph+drawing_area->get_height()/2-h/2);
 
-       const int width_in_tiles(w/tile_w+(w%tile_w?1:0));
+       const int width_in_tiles(w/tile_w+((low_resolution?((w/2)%(tile_w/2)):(w%tile_w))?1:0));
        const int height_in_tiles(h/tile_h+(h%tile_h?1:0));
 
        int