本文整理汇总了Java中org.mapsforge.core.graphics.GraphicFactory类的典型用法代码示例。如果您正苦于以下问题:Java GraphicFactory类的具体用法?Java GraphicFactory怎么用?Java GraphicFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GraphicFactory类属于org.mapsforge.core.graphics包,在下文中一共展示了GraphicFactory类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Pin
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
/**
* Create a pin with category and label.
*
* @param latLong position
* @param category text in the pin
* @param label text below the pin
* @param gf GraphicFactory
*/
public Pin(LatLong latLong, String category, String label, GraphicFactory gf) {
super();
this.latLong = latLong;
this.category = category;
this.label = label;
this.gf = gf;
if (gf.getClass().getSimpleName().equals("AndroidGraphicFactory")) {
scale = 1.0f;
}
}
示例2: initialize
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
@Override
public void initialize() throws MapSourceInitializationException {
GraphicFactory graphicFactory = AwtGraphicFactory.INSTANCE;
if (!mapFile.exists())
throw new MapSourceInitializationException("File does not exist: " + mapFile.getAbsolutePath());
multiMapDataStore = new MultiMapDataStore(MultiMapDataStore.DataPolicy.RETURN_FIRST);
multiMapDataStore.addMapDataStore(new MapFile(mapFile), true, true);
renderer = new DatabaseRenderer(multiMapDataStore, graphicFactory, tileCache);
renderThemeFuture = new RenderThemeFuture(graphicFactory, xmlRenderTheme, displayModel);
// new Thread(renderThemeFuture).start();
renderThemeFuture.run();
// renderThemeFuture = new RenderThemeFuture(graphicFactory, xmlRenderTheme, displayModel);
// renderThemeFuture.run();
}
示例3: AlternatingLine
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
public AlternatingLine(GraphicFactory graphicFactory) {
super(null, graphicFactory);
for (int i = 0; i < paints.length; i++) {
paints[i] = AndroidGraphicFactory.INSTANCE.createPaint();
paints[i].setStrokeWidth(16);
paints[i].setStyle(Style.STROKE);
}
paints[0].setColor(AndroidGraphicFactory.INSTANCE.createColor(Color.GREEN));
paints[1].setColor(AndroidGraphicFactory.INSTANCE.createColor(255, 255, 255, 0));
paints[2].setColor(AndroidGraphicFactory.INSTANCE.createColor(Color.RED));
}
示例4: AlternatingLine
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
public AlternatingLine(GraphicFactory graphicFactory) {
super(null, graphicFactory);
this.graphicFactory = graphicFactory;
}
示例5: RasterLayer
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
public RasterLayer(Context context, TileCache tileCache, MapViewPosition mapViewPosition, boolean isTransparent,
GraphicFactory graphicFactory, final RasterRenderer pRasterRenderer, final IWorkStatus status) {
super(tileCache, mapViewPosition, graphicFactory.createMatrix(), isTransparent);
this.rasterFile = new File(pRasterRenderer.getFilePath());
this.rasterRenderer = pRasterRenderer;
this.mStatus = status;
this.mProcCount = Runtime.getRuntime().availableProcessors();
}
示例6: GDALMapsforgeRenderer
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
public GDALMapsforgeRenderer(GraphicFactory graphicFactory, final GDALDataset pRaster) {
this.graphicFactory = graphicFactory;
this.mRasterDataset = pRaster;
}
示例7: PinGroup
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
/**
* Create a PinGroup
*
* @param category text in the pin
* @param gf GraphicFactory
* @param proj Projection
*/
public PinGroup(String category, GraphicFactory gf, MapViewProjection proj) {
this.category = category;
this.gf = gf;
this.proj = proj;
}
示例8: MBTilesMapsforgeRenderer
import org.mapsforge.core.graphics.GraphicFactory; //导入依赖的package包/类
public MBTilesMapsforgeRenderer(GraphicFactory graphicFactory, final MBTilesDataset pDataset) {
this.mDataset = pDataset;
this.graphicFactory = graphicFactory;
}