/*! \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
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;
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);
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;
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);