Class AwtGraphicFactory

java.lang.Object
org.mapsforge.map.awt.graphics.AwtGraphicFactory
All Implemented Interfaces:
org.mapsforge.core.graphics.GraphicFactory

public class AwtGraphicFactory extends Object implements org.mapsforge.core.graphics.GraphicFactory
  • Field Details

    • INSTANCE

      public static final org.mapsforge.core.graphics.GraphicFactory INSTANCE
  • Constructor Details

    • AwtGraphicFactory

      public AwtGraphicFactory()
  • Method Details

    • createGraphicContext

      public static org.mapsforge.core.graphics.GraphicContext createGraphicContext(Graphics graphics)
    • getGraphics

      public static 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:
      createBitmap in interface org.mapsforge.core.graphics.GraphicFactory
    • createBitmap

      public org.mapsforge.core.graphics.Bitmap createBitmap(int width, int height, boolean isTransparent)
      Specified by:
      createBitmap in interface org.mapsforge.core.graphics.GraphicFactory
    • getBitmap

      public static 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:
      createCanvas in interface org.mapsforge.core.graphics.GraphicFactory
    • createColor

      public int createColor(org.mapsforge.core.graphics.Color color)
      Specified by:
      createColor in interface org.mapsforge.core.graphics.GraphicFactory
    • createColor

      public int createColor(int alpha, int red, int green, int blue)
      Specified by:
      createColor in interface org.mapsforge.core.graphics.GraphicFactory
    • createMatrix

      public org.mapsforge.core.graphics.Matrix createMatrix()
      Specified by:
      createMatrix in interface org.mapsforge.core.graphics.GraphicFactory
    • createMonoBitmap

      public AwtHillshadingBitmap createMonoBitmap(int width, int height, byte[] buffer, int padding, org.mapsforge.core.model.BoundingBox area)
      Specified by:
      createMonoBitmap in interface org.mapsforge.core.graphics.GraphicFactory
    • createPaint

      public org.mapsforge.core.graphics.Paint createPaint()
      Specified by:
      createPaint in interface org.mapsforge.core.graphics.GraphicFactory
    • createPaint

      public org.mapsforge.core.graphics.Paint createPaint(org.mapsforge.core.graphics.Paint paint)
      Specified by:
      createPaint in interface org.mapsforge.core.graphics.GraphicFactory
    • createPath

      public org.mapsforge.core.graphics.Path createPath()
      Specified by:
      createPath in interface org.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, 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:
      createPointTextContainer in interface org.mapsforge.core.graphics.GraphicFactory
    • createResourceBitmap

      public org.mapsforge.core.graphics.ResourceBitmap createResourceBitmap(InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash) throws IOException
      Specified by:
      createResourceBitmap in interface org.mapsforge.core.graphics.GraphicFactory
      Throws:
      IOException
    • createTileBitmap

      public org.mapsforge.core.graphics.TileBitmap createTileBitmap(InputStream inputStream, int tileSize, boolean hasAlpha) throws IOException
      Specified by:
      createTileBitmap in interface org.mapsforge.core.graphics.GraphicFactory
      Throws:
      IOException
    • createTileBitmap

      public org.mapsforge.core.graphics.TileBitmap createTileBitmap(int tileSize, boolean hasAlpha)
      Specified by:
      createTileBitmap in interface org.mapsforge.core.graphics.GraphicFactory
    • platformSpecificSources

      public InputStream platformSpecificSources(String relativePathPrefix, String src) throws IOException
      Specified by:
      platformSpecificSources in interface org.mapsforge.core.graphics.GraphicFactory
      Throws:
      IOException
    • renderSvg

      public org.mapsforge.core.graphics.ResourceBitmap renderSvg(InputStream inputStream, float scaleFactor, int width, int height, int percent, int hash) throws IOException
      Specified by:
      renderSvg in interface org.mapsforge.core.graphics.GraphicFactory
      Throws:
      IOException