LineLayer: drop line segments short than 1/8

This commit is contained in:
Hannes Janetzek 2014-01-26 20:08:00 +01:00
parent 457e3006a6
commit a42bd9684f

View File

@ -170,6 +170,7 @@ public final class LineLayer extends RenderElement {
// Unit vector to next node
a = (float) Math.sqrt(vx * vx + vy * vy);
vx /= a;
vy /= a;
@ -340,6 +341,11 @@ public final class LineLayer extends RenderElement {
wx = nextX - x;
wy = nextY - y;
a = (float) Math.sqrt(wx * wx + wy * wy);
// skip too short segmets
if (a < 1) {
numVertices -= 2;
continue;
}
wx /= a;
wy /= a;
@ -548,7 +554,6 @@ public final class LineLayer extends RenderElement {
}
si.used = opos;
//curItem = si;
}
@Override