Class CartographicSupportToolkit
java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.CartographicSupportToolkit
- Author:
- jaume dominguez faus - jaume.dominguez@iver.es
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe unit that will be used when creating new symbols.
Factory defaults to pixel.static intThe reference system that will be used when creating new symbols.
Factory defaults to pixel. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom) static doublegetCartographicLength(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).static doublegetCartographicLength(CartographicSupport cartographicElement, double length, CartographicSupport.CartographicContext ctx) static doublegetCartographicLength(CartographicSupport cartographicElement, double length, ViewPort viewPort, double dpi) static doublestatic voidsetScreenDpi(double dpi)
-
Field Details
-
DefaultMeasureUnit
public static int DefaultMeasureUnitThe unit that will be used when creating new symbols.
Factory defaults to pixel. -
DefaultReferenceSystem
public static int DefaultReferenceSystemThe 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 lengthlength- The length to be computed in pixels. The length is supposed to be provided in the units defined in the cartographicElementdpi- 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()
-