public interface CartographicSupport
This interface enables Cartographic support for those graphical elements that require
additional runtime information rather than the feature itself geometric definitions.
It allows to realworld's measure units dimensioning.
It also supplies a toolkit to perform operations with centralized static methods.
inner class' methods
Modifier and Type | Interface and Description |
---|---|
static interface |
CartographicSupport.CartographicContext |
Modifier and Type | Method and Description |
---|---|
void |
copyCartographicContext(CartographicSupport element) |
static void |
copyCartographicContext(CartographicSupport source,
java.lang.Object target) |
CartographicSupport.CartographicContext |
getCartographicContext() |
int |
getReferenceSystem()
Returns the Reference System used to draw the elements of the image.
|
int |
getUnit()
Returns the unit used to express measures.
|
void |
setCartographicContext(CartographicSupport.CartographicContext ctx) |
void |
setCartographicContext(double dpi) |
void |
setCartographicContext(PrintAttributes properties) |
void |
setCartographicContext(ViewPort viewPort,
double dpi,
Geometry geom) |
void |
setCartographicContext(ViewPort viewPort,
PrintAttributes properties,
Geometry geom) |
void |
setReferenceSystem(int referenceSystem)
Sets the Reference System that defines how this units have to be
handled.
|
void |
setUnit(int unitIndex)
Defines the unit used to express measures.
|
double |
toCartographicUnits(double value) |
static final int WORLD
static final int PAPER
void setUnit(int unitIndex)
unitIndex,
- the index of the unit in the MapContext.NAMES arrayint getUnit()
int getReferenceSystem()
The elements have to be scaled to pixel when the image is bein drawn in
order to compose the map. The elements of the map may define its size in
other units than pixel.
CartographicSupport enables the elements to define the size in
measure units but these units may refer to different reference system. Two
kinds of Reference Systems are allowed in this context: CartographicSupport.WORLD,
and CartographicSupport.PAPER.
Depending on which Reference System is used the unit used by this element
refers to distances in the real world (then they are map's CRS-dependant)
or screen or printer output (then they are output DPI-dependant)
In case the unit used is pixel then the reference system does not
have any effect since the source unit is the same than the target unit.
void setReferenceSystem(int referenceSystem)
CartographicSupport.CartographicContext getCartographicContext()
void setCartographicContext(ViewPort viewPort, PrintAttributes properties, Geometry geom)
void setCartographicContext(double dpi)
void setCartographicContext(PrintAttributes properties)
void setCartographicContext(CartographicSupport.CartographicContext ctx)
void copyCartographicContext(CartographicSupport element)
double toCartographicUnits(double value)
static void copyCartographicContext(CartographicSupport source, java.lang.Object target)