Class CartographicSupportToolkit

java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.CartographicSupportToolkit

public class CartographicSupportToolkit extends Object
Author:
jaume dominguez faus - jaume.dominguez@iver.es
  • Field Details

    • DefaultMeasureUnit

      public static int DefaultMeasureUnit
      The unit that will be used when creating new symbols.
      Factory defaults to pixel.
    • DefaultReferenceSystem

      public static int DefaultReferenceSystem
      The reference system that will be used when creating new symbols.
      Factory defaults to pixel.
  • Constructor Details

    • CartographicSupportToolkit

      public CartographicSupportToolkit()
  • Method Details

    • createCartographicContext

      public static CartographicSupport.CartographicContext createCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom)
    • getCartographicLength

      public static double getCartographicLength(CartographicSupport cartographicElement, double length, double dist1Pixel, int mapUnits, double dpi)
      Calculates the distance in pixels corresponding to the provided length, according to the current rendering context (output dpi, map scale, map units) and the symbol cartographic settings (unit, size, and unit reference system).
      Parameters:
      cartographicElement - CartographicSupport object which contains the reference system and the measuring units for the provided length
      length - The length to be computed in pixels. The length is supposed to be provided in the units defined in the cartographicElement
      dpi - The resolution (dots per inch) of the target display device (printer, screen, etc)
      viewPort - The viewport, which defines the relationship between pixels and maps units
      Returns:
      The distance in pixels corresponding to the provided length
    • getCartographicLength

      public static double getCartographicLength(CartographicSupport cartographicElement, double length, ViewPort viewPort, double dpi)
    • getCartographicLength

      public static double getCartographicLength(CartographicSupport cartographicElement, double length, CartographicSupport.CartographicContext ctx)
    • setScreenDpi

      public static void setScreenDpi(double dpi)
    • getScreenDpi

      public static double getScreenDpi()