From: dooglus Date: Sat, 31 Mar 2007 00:19:39 +0000 (+0000) Subject: If the rows are wider than our PIXEL_RENDERING_LIMIT, then still render a row. Previ... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fc84f8f703d9fe04a4f8aba2ea1539c78cb76647;p=synfig.git If the rows are wider than our PIXEL_RENDERING_LIMIT, then still render a row. Previously we were deciding to render 0 rows at a time and getting a divide-by-zero error in that case. git-svn-id: http://svn.voria.com/code@396 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/target_scanline.cpp b/synfig-core/trunk/src/synfig/target_scanline.cpp index 0272442..19f38f2 100644 --- a/synfig-core/trunk/src/synfig/target_scanline.cpp +++ b/synfig-core/trunk/src/synfig/target_scanline.cpp @@ -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; @@ -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;