API: PolygonLayer add addPolygon(GeometryBuffer)

This commit is contained in:
Hannes Janetzek 2013-09-17 09:45:24 +02:00
parent 15aa35e56f
commit 7a35bb48b1

View File

@ -22,6 +22,7 @@ import java.nio.ShortBuffer;
import org.oscim.backend.GL20; import org.oscim.backend.GL20;
import org.oscim.backend.GLAdapter; import org.oscim.backend.GLAdapter;
import org.oscim.backend.Log; import org.oscim.backend.Log;
import org.oscim.core.GeometryBuffer;
import org.oscim.core.MapPosition; import org.oscim.core.MapPosition;
import org.oscim.core.Tile; import org.oscim.core.Tile;
import org.oscim.renderer.MapRenderer; import org.oscim.renderer.MapRenderer;
@ -46,6 +47,10 @@ public final class PolygonLayer extends RenderElement {
vertexItems = curItem; vertexItems = curItem;
} }
public void addPolygon(GeometryBuffer geom){
addPolygon(geom.points, geom.index);
}
public void addPolygon(float[] points, short[] index) { public void addPolygon(float[] points, short[] index) {
short center = (short) ((Tile.SIZE >> 1) * S); short center = (short) ((Tile.SIZE >> 1) * S);