Package org.mapsforge.map.awt.graphics
Class AwtGraphicFactory
- java.lang.Object
-
- org.mapsforge.map.awt.graphics.AwtGraphicFactory
-
- All Implemented Interfaces:
org.mapsforge.core.graphics.GraphicFactory
public class AwtGraphicFactory extends java.lang.Object implements org.mapsforge.core.graphics.GraphicFactory
-
-
Field Summary
Fields Modifier and Type Field Description static org.mapsforge.core.graphics.GraphicFactoryINSTANCE
-
Constructor Summary
Constructors Constructor Description AwtGraphicFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidclearResourceFileCache()static voidclearResourceMemoryCache()org.mapsforge.core.graphics.BitmapcreateBitmap(int width, int height)org.mapsforge.core.graphics.BitmapcreateBitmap(int width, int height, boolean isTransparent)org.mapsforge.core.graphics.CanvascreateCanvas()intcreateColor(int alpha, int red, int green, int blue)intcreateColor(org.mapsforge.core.graphics.Color color)static org.mapsforge.core.graphics.GraphicContextcreateGraphicContext(java.awt.Graphics graphics)org.mapsforge.core.graphics.MatrixcreateMatrix()AwtHillshadingBitmapcreateMonoBitmap(int width, int height, byte[] buffer, int padding, org.mapsforge.core.model.BoundingBox area)org.mapsforge.core.graphics.PaintcreatePaint()org.mapsforge.core.graphics.PaintcreatePaint(org.mapsforge.core.graphics.Paint paint)org.mapsforge.core.graphics.PathcreatePath()org.mapsforge.core.mapelements.PointTextContainercreatePointTextContainer(org.mapsforge.core.model.Point xy, org.mapsforge.core.graphics.Display display, int priority, java.lang.String text, org.mapsforge.core.graphics.Paint paintFront, org.mapsforge.core.graphics.Paint paintBack, org.mapsforge.core.mapelements.SymbolContainer symbolContainer, org.mapsforge.core.graphics.Position position, int maxTextWidth)org.mapsforge.core.graphics.ResourceBitmapcreateResourceBitmap(java.io.InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash)org.mapsforge.core.graphics.TileBitmapcreateTileBitmap(int tileSize, boolean hasAlpha)org.mapsforge.core.graphics.TileBitmapcreateTileBitmap(java.io.InputStream inputStream, int tileSize, boolean hasAlpha)static java.awt.image.BufferedImagegetBitmap(org.mapsforge.core.graphics.Bitmap bitmap)Returns the internal image representation.static java.awt.Graphics2DgetGraphics(org.mapsforge.core.graphics.Canvas canvas)static AwtPaintgetPaint(org.mapsforge.core.graphics.Paint paint)java.io.InputStreamplatformSpecificSources(java.lang.String relativePathPrefix, java.lang.String src)org.mapsforge.core.graphics.ResourceBitmaprenderSvg(java.io.InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash)
-
-
-
Method Detail
-
createGraphicContext
public static org.mapsforge.core.graphics.GraphicContext createGraphicContext(java.awt.Graphics graphics)
-
getGraphics
public static java.awt.Graphics2D getGraphics(org.mapsforge.core.graphics.Canvas canvas)
-
getPaint
public static AwtPaint getPaint(org.mapsforge.core.graphics.Paint paint)
-
clearResourceFileCache
public static void clearResourceFileCache()
-
clearResourceMemoryCache
public static void clearResourceMemoryCache()
-
createBitmap
public org.mapsforge.core.graphics.Bitmap createBitmap(int width, int height)- Specified by:
createBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createBitmap
public org.mapsforge.core.graphics.Bitmap createBitmap(int width, int height, boolean isTransparent)- Specified by:
createBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
getBitmap
public static java.awt.image.BufferedImage getBitmap(org.mapsforge.core.graphics.Bitmap bitmap)
Returns the internal image representation.- Parameters:
bitmap- Mapsforge Bitmap- Returns:
- platform specific image.
-
createCanvas
public org.mapsforge.core.graphics.Canvas createCanvas()
- Specified by:
createCanvasin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createColor
public int createColor(org.mapsforge.core.graphics.Color color)
- Specified by:
createColorin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createColor
public int createColor(int alpha, int red, int green, int blue)- Specified by:
createColorin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createMatrix
public org.mapsforge.core.graphics.Matrix createMatrix()
- Specified by:
createMatrixin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createMonoBitmap
public AwtHillshadingBitmap createMonoBitmap(int width, int height, byte[] buffer, int padding, org.mapsforge.core.model.BoundingBox area)
- Specified by:
createMonoBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createPaint
public org.mapsforge.core.graphics.Paint createPaint()
- Specified by:
createPaintin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createPaint
public org.mapsforge.core.graphics.Paint createPaint(org.mapsforge.core.graphics.Paint paint)
- Specified by:
createPaintin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createPath
public org.mapsforge.core.graphics.Path createPath()
- Specified by:
createPathin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createPointTextContainer
public org.mapsforge.core.mapelements.PointTextContainer createPointTextContainer(org.mapsforge.core.model.Point xy, org.mapsforge.core.graphics.Display display, int priority, java.lang.String text, org.mapsforge.core.graphics.Paint paintFront, org.mapsforge.core.graphics.Paint paintBack, org.mapsforge.core.mapelements.SymbolContainer symbolContainer, org.mapsforge.core.graphics.Position position, int maxTextWidth)- Specified by:
createPointTextContainerin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
createResourceBitmap
public org.mapsforge.core.graphics.ResourceBitmap createResourceBitmap(java.io.InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash) throws java.io.IOException- Specified by:
createResourceBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory- Throws:
java.io.IOException
-
createTileBitmap
public org.mapsforge.core.graphics.TileBitmap createTileBitmap(java.io.InputStream inputStream, int tileSize, boolean hasAlpha) throws java.io.IOException- Specified by:
createTileBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory- Throws:
java.io.IOException
-
createTileBitmap
public org.mapsforge.core.graphics.TileBitmap createTileBitmap(int tileSize, boolean hasAlpha)- Specified by:
createTileBitmapin interfaceorg.mapsforge.core.graphics.GraphicFactory
-
platformSpecificSources
public java.io.InputStream platformSpecificSources(java.lang.String relativePathPrefix, java.lang.String src) throws java.io.IOException- Specified by:
platformSpecificSourcesin interfaceorg.mapsforge.core.graphics.GraphicFactory- Throws:
java.io.IOException
-
renderSvg
public org.mapsforge.core.graphics.ResourceBitmap renderSvg(java.io.InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash) throws java.io.IOException- Specified by:
renderSvgin interfaceorg.mapsforge.core.graphics.GraphicFactory- Throws:
java.io.IOException
-
-