public class CartographicSupportToolkit
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DefaultMeasureUnit
The unit that will be used when creating new symbols.
|
static int |
DefaultReferenceSystem
The reference system that will be used when creating new symbols.
|
| Constructor and Description |
|---|
CartographicSupportToolkit() |
| Modifier and Type | Method and Description |
|---|---|
static CartographicSupport.CartographicContext |
createCartographicContext(ViewPort viewPort,
double dpi,
Geometry geom) |
static double |
getCartographicLength(CartographicSupport cartographicElement,
double length,
CartographicSupport.CartographicContext ctx) |
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).
|
static double |
getCartographicLength(CartographicSupport cartographicElement,
double length,
ViewPort viewPort,
double dpi) |
static double |
getScreenDpi() |
static void |
setScreenDpi(double dpi) |
public static int DefaultMeasureUnit
public static int DefaultReferenceSystem
public static CartographicSupport.CartographicContext createCartographicContext(ViewPort viewPort, double dpi, Geometry geom)
public static double getCartographicLength(CartographicSupport cartographicElement, double length, double dist1Pixel, int mapUnits, double dpi)
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 cartographicElementviewPort - The viewport, which defines the relationship between pixels and maps unitsdpi - The resolution (dots per inch) of the target display device
(printer, screen, etc)public static double getCartographicLength(CartographicSupport cartographicElement, double length, ViewPort viewPort, double dpi)
public static double getCartographicLength(CartographicSupport cartographicElement, double length, CartographicSupport.CartographicContext ctx)
public static void setScreenDpi(double dpi)
public static double getScreenDpi()