X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Ftarget_scanline.cpp;h=d4ba4aea96564a680229cf9debf31a13dddb29ca;hb=f946b9197388ec3cdf17369b52432d58b52be65e;hp=aeb28694672dd46cee79fc47bfe70cebbe36b850;hpb=cc54c38609ee9745ad678e5e9b9d7d2912be9c95;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index aeb2869..d4ba4ae 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -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);