projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Woops, remove the testing en_AU from ALL_LINGUAS
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
layer_shape.cpp
diff --git
a/synfig-core/trunk/src/synfig/layer_shape.cpp
b/synfig-core/trunk/src/synfig/layer_shape.cpp
index
3f91a64
..
2d8af12
100644
(file)
--- a/
synfig-core/trunk/src/synfig/layer_shape.cpp
+++ b/
synfig-core/trunk/src/synfig/layer_shape.cpp
@@
-60,8
+60,8
@@
using namespace etl;
SYNFIG_LAYER_INIT(Layer_Shape);
SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape");
SYNFIG_LAYER_INIT(Layer_Shape);
SYNFIG_LAYER_SET_NAME(Layer_Shape,"shape");
-SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,_("Shape"));
-SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,_("Internal"));
+SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Shape,
N
_("Shape"));
+SYNFIG_LAYER_SET_CATEGORY(Layer_Shape,
N
_("Internal"));
SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1");
SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id$");
SYNFIG_LAYER_SET_VERSION(Layer_Shape,"0.1");
SYNFIG_LAYER_SET_CVS_ID(Layer_Shape,"$Id$");
@@
-1699,7
+1699,7
@@
void Layer_Shape::PolySpan::draw_scanline(int y, Real x1, Real fy1, Real x2, Rea
//case all in same pixel
if(ix1 == ix2) //impossible for degenerate case (covered by the previous cases)
{
//case all in same pixel
if(ix1 == ix2) //impossible for degenerate case (covered by the previous cases)
{
- current.addcover(dy,(fx1 + fx2)*dy/2); //horizontal trap
a
zoid area
+ current.addcover(dy,(fx1 + fx2)*dy/2); //horizontal trap
e
zoid area
return;
}
return;
}
@@
-1713,7
+1713,7
@@
void Layer_Shape::PolySpan::draw_scanline(int y, Real x1, Real fy1, Real x2, Rea
mult = (1 - fx1)*dydx; //next y intersection diff value (at 1)
//first pixel
mult = (1 - fx1)*dydx; //next y intersection diff value (at 1)
//first pixel
- current.addcover(mult,(1 + fx1)*mult/2); // fx1,fy1,1,fy@1 - starting trap
a
zoidal area
+ current.addcover(mult,(1 + fx1)*mult/2); // fx1,fy1,1,fy@1 - starting trap
e
zoidal area
//move to the next pixel
fy1 += mult;
//move to the next pixel
fy1 += mult;
@@
-1749,7
+1749,7
@@
void Layer_Shape::PolySpan::draw_scanline(int y, Real x1, Real fy1, Real x2, Rea
mult = fx1*dydx; //next y intersection diff value
//first pixel
mult = fx1*dydx; //next y intersection diff value
//first pixel
- current.addcover(mult,fx1*mult/2); // fx1,fy1,0,fy@0 - starting trap
a
zoidal area
+ current.addcover(mult,fx1*mult/2); // fx1,fy1,0,fy@0 - starting trap
e
zoidal area
//move to next pixel
fy1 += mult;
//move to next pixel
fy1 += mult;
@@
-1877,7
+1877,7
@@
void Layer_Shape::PolySpan::draw_line(Real x1, Real y1, Real x2, Real y2)
mult = (1 - fy1) * dxdy;
mult = (1 - fy1) * dxdy;
- //x interset scanline
+ //x interse
c
t scanline
x_from = x1 + mult;
draw_scanline(iy1,x1,fy1,x_from,1);
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;
mult = fy1 * dxdy;
- //x interset scanline
+ //x interse
c
t scanline
x_from = x1 + mult;
draw_scanline(iy1,x1,fy1,x_from,0);
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;
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;
//optimization for tessellating only inside tiles
span.window.minx = 0;
span.window.miny = 0;