Prevent 2 * "warning: converting to 'int' from 'double'"
[synfig.git] / synfig-core / trunk / src / synfig / layer_shape.cpp
index 522f42e..a686bcf 100644 (file)
@@ -1877,7 +1877,7 @@ void Layer_Shape::PolySpan::draw_line(Real x1, Real y1, Real x2, Real y2)
 
                mult = (1 - fy1) * dxdy;
 
-               //x interset scanline
+               //x intersect scanline
                x_from = x1 + mult;
                draw_scanline(iy1,x1,fy1,x_from,1);
 
@@ -1907,7 +1907,7 @@ void Layer_Shape::PolySpan::draw_line(Real x1, Real y1, Real x2, Real y2)
 
                mult = fy1 * dxdy;
 
-               //x interset scanline
+               //x intersect scanline
                x_from = x1 + mult;
                draw_scanline(iy1,x1,fy1,x_from,0);
 
@@ -2640,6 +2640,10 @@ Layer_Shape::render_shape(Surface *surface,bool useblend,int /*quality*/,
 
        PolySpan        span;
 
+       // if the pixels are zero sized then we're too zoomed out to see anything
+       if (pw == 0 || ph == 0)
+               return true;
+
        //optimization for tessellating only inside tiles
        span.window.minx = 0;
        span.window.miny = 0;