add GeometryBuffer function to LineLayer

This commit is contained in:
Hannes Janetzek 2013-04-22 13:16:52 +02:00
parent 170fc76991
commit 03e7579835

View File

@ -16,6 +16,7 @@ package org.oscim.renderer.layer;
import java.nio.ShortBuffer;
import org.oscim.core.GeometryBuffer;
import org.oscim.core.Tile;
import org.oscim.graphics.Paint.Cap;
import org.oscim.renderer.GLRenderer;
@ -72,6 +73,13 @@ public final class LineLayer extends Layer {
addLine(points, index, -1, closed);
}
public void addLine(GeometryBuffer geom) {
if (geom.mode == 3)
addLine(geom.points, geom.index, -1, true);
else if (geom.mode == 2)
addLine(geom.points, geom.index, -1, false);
}
public void addLine(float[] points, int numPoints, boolean closed) {
if (numPoints >= 4)
addLine(points, null, numPoints, closed);