Comment out an unused function.
[synfig.git] / synfig-core / trunk / src / synfig / target_scanline.cpp
index 3021884..d4ba4ae 100644 (file)
@@ -2,7 +2,7 @@
 /*!    \file target_scanline.cpp
 **     \brief Template File
 **
-**     $Id: target_scanline.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $
+**     $Id$
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
@@ -125,7 +125,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
        curr_frame_=0;
 
        if( !init() ){
-               if(cb) cb->error(_("Target initialisation failure"));
+               if(cb) cb->error(_("Target initialization failure"));
                return false;
        }
 
@@ -203,6 +203,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
 
                                Surface surface;
                                int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w();
+                               if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit?
                                int rows = desc.get_h()/rowheight;
                                int lastrowheight = desc.get_h() - rows*rowheight;
 
@@ -222,7 +223,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
                                        RendDesc        blockrd = desc;
 
                                        //render the strip at the normal size unless it's the last one...
-                                       if(i == rows)
+                                       if(i == rows-1)
                                        {
                                                if(!lastrowheight) break;
                                                blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);
@@ -338,6 +339,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
                                Surface surface;
                                int totalheight = desc.get_h();
                                int rowheight = PIXEL_RENDERING_LIMIT/desc.get_w();
+                               if (!rowheight) rowheight = 1; // TODO: render partial lines to stay within the limit?
                                int rows = desc.get_h()/rowheight;
                                int lastrowheight = desc.get_h() - rows*rowheight;
 
@@ -357,7 +359,7 @@ synfig::Target_Scanline::render(ProgressCallback *cb)
                                        RendDesc        blockrd = desc;
 
                                        //render the strip at the normal size unless it's the last one...
-                                       if(i == rows)
+                                       if(i == rows-1)
                                        {
                                                if(!lastrowheight) break;
                                                blockrd.set_subwindow(0,i*rowheight,desc.get_w(),lastrowheight);