some line rendering fixes and optimizations

This commit is contained in:
Artem Pavlenko 2006-02-11 00:39:50 +00:00
parent aed5516197
commit e3c1365043
2 changed files with 4 additions and 5 deletions

View file

@ -1657,7 +1657,7 @@ namespace agg
}
else
{
while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
while(abs(sx - lp.x1) + abs(sy - lp.y1) > 2 * lp2.len)
{
sx = (lp.x1 + sx) >> 1;
sy = (lp.y1 + sy) >> 1;
@ -1724,7 +1724,7 @@ namespace agg
}
else
{
while(abs(ex - lp.x2) + abs(ey - lp.y2) > lp2.len)
while(abs(ex - lp.x2) + abs(ey - lp.y2) > 2 * lp2.len)
{
ex = (lp.x2 + ex) >> 1;
ey = (lp.y2 + ey) >> 1;
@ -1796,7 +1796,7 @@ namespace agg
}
else
{
while(abs(sx - lp.x1) + abs(sy - lp.y1) > lp2.len)
while(abs(sx - lp.x1) + abs(sy - lp.y1) > 2 * lp2.len)
{
sx = (lp.x1 + sx) >> 1;
sy = (lp.y1 + sy) >> 1;
@ -1809,7 +1809,7 @@ namespace agg
}
else
{
while(abs(ex - lp.x2) + abs(ey - lp.y2) > lp2.len)
while(abs(ex - lp.x2) + abs(ey - lp.y2) > 2 * lp2.len)
{
ex = (lp.x2 + ex) >> 1;
ey = (lp.y2 + ey) >> 1;

View file

@ -192,7 +192,6 @@ namespace mapnik
}
else if (stroke_.get_width() <= 1.0)
{
//faster but clipping doesn't work
agg::line_profile_aa prof;
prof.width(stroke_.get_width());
renderer_oaa ren_oaa(renb, prof);