API: SymbolItem add set(x,y,symbol,billboard)
This commit is contained in:
parent
61e9deb101
commit
eada09d060
@ -450,13 +450,14 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
|||||||
Log.d(TAG, "missing symbol for " + mElement.tags.asString());
|
Log.d(TAG, "missing symbol for " + mElement.tags.asString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (int i = 0, n = mElement.getNumPoints(); i < n; i++) {
|
||||||
|
PointF p = mElement.getPoint(i);
|
||||||
|
|
||||||
SymbolItem it = SymbolItem.pool.get();
|
SymbolItem it = SymbolItem.pool.get();
|
||||||
it.x = mElement.points[0];
|
it.set(p.x, p.y, symbol.texture, true);
|
||||||
it.y = mElement.points[1];
|
|
||||||
it.texRegion = symbol.texture;
|
|
||||||
it.billboard = true;
|
|
||||||
mTile.addSymbol(it);
|
mTile.addSymbol(it);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderAreaSymbol(Symbol symbol) {
|
public void renderAreaSymbol(Symbol symbol) {
|
||||||
|
|||||||
@ -20,7 +20,6 @@ import org.oscim.renderer.atlas.TextureRegion;
|
|||||||
import org.oscim.utils.pool.Inlist;
|
import org.oscim.utils.pool.Inlist;
|
||||||
import org.oscim.utils.pool.SyncPool;
|
import org.oscim.utils.pool.SyncPool;
|
||||||
|
|
||||||
|
|
||||||
public class SymbolItem extends Inlist<SymbolItem> {
|
public class SymbolItem extends Inlist<SymbolItem> {
|
||||||
|
|
||||||
public final static SyncPool<SymbolItem> pool = new SyncPool<SymbolItem>() {
|
public final static SyncPool<SymbolItem> pool = new SyncPool<SymbolItem>() {
|
||||||
@ -48,4 +47,18 @@ public class SymbolItem extends Inlist<SymbolItem> {
|
|||||||
public Bitmap bitmap;
|
public Bitmap bitmap;
|
||||||
public Point offset;
|
public Point offset;
|
||||||
|
|
||||||
|
public void set(float x, float y, TextureRegion texture, boolean billboard) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.texRegion = texture;
|
||||||
|
this.billboard = billboard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set(float x, float y, Bitmap bitmap, boolean billboard) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
this.bitmap = bitmap;
|
||||||
|
this.billboard = billboard;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user