Class AbstractCartographicSupport
- All Implemented Interfaces:
CartographicSupport
- Direct Known Subclasses:
AbstractSymbol
- Author:
- fdiaz
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
CartographicSupport.CartographicContext -
Field Summary
Fields inherited from interface org.gvsig.fmap.mapcontext.rendering.symbols.CartographicSupport
PAPER, WORLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidintReturns the Reference System used to draw the elements of the image.intgetUnit()Returns the unit used to express measures.booleanvoidsetCartographicContext(double dpi) voidsetCartographicContext(org.gvsig.compat.print.PrintAttributes properties) voidvoidsetCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom) voidsetCartographicContext(ViewPort viewPort, org.gvsig.compat.print.PrintAttributes properties, org.gvsig.fmap.geom.Geometry geometry) voidsetReferenceSystem(int system) Sets the Reference System that defines how this units have to be handled.voidsetUnit(int unitIndex) Defines the unit used to express measures.doubletoCartographicUnits(double value)
-
Constructor Details
-
AbstractCartographicSupport
public AbstractCartographicSupport()
-
-
Method Details
-
setCartographicContext
public void setCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom) - Specified by:
setCartographicContextin interfaceCartographicSupport
-
setCartographicContext
public void setCartographicContext(ViewPort viewPort, org.gvsig.compat.print.PrintAttributes properties, org.gvsig.fmap.geom.Geometry geometry) - Specified by:
setCartographicContextin interfaceCartographicSupport
-
setCartographicContext
public void setCartographicContext(double dpi) - Specified by:
setCartographicContextin interfaceCartographicSupport
-
setCartographicContext
public void setCartographicContext(org.gvsig.compat.print.PrintAttributes properties) - Specified by:
setCartographicContextin interfaceCartographicSupport
-
getCartographicContext
- Specified by:
getCartographicContextin interfaceCartographicSupport
-
toCartographicUnits
public double toCartographicUnits(double value) - Specified by:
toCartographicUnitsin interfaceCartographicSupport
-
setCartographicContext
- Specified by:
setCartographicContextin interfaceCartographicSupport
-
copyCartographicContext
- Specified by:
copyCartographicContextin interfaceCartographicSupport
-
setUnit
public void setUnit(int unitIndex) Description copied from interface:CartographicSupportDefines the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.- Specified by:
setUnitin interfaceCartographicSupport- Parameters:
unitIndex- , the index of the unit in the MapContext.NAMES array
-
getUnit
public int getUnit()Description copied from interface:CartographicSupportReturns the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.- Specified by:
getUnitin interfaceCartographicSupport
-
getReferenceSystem
public int getReferenceSystem()Description copied from interface:CartographicSupportReturns the Reference System used to draw the elements of the image.
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.
- Specified by:
getReferenceSystemin interfaceCartographicSupport- Returns:
-
setReferenceSystem
public void setReferenceSystem(int system) Description copied from interface:CartographicSupportSets the Reference System that defines how this units have to be handled. Possible values are:- CartographySupport.WORLD: Defines that the unit values refer to distances in the world. So, the size of the element displayed depends directly on the scale and CRS used by the map. The size of the elements defined to use CartographicSupport.WORLD will match exactly to their actual size in the real world.
- CartographySupport.PAPER: Defines that the unit values refer to the length that the element will have regardless where it appears. If ReferenceSystem is CartographySupport.PAPER, and the length is (e.g.) millimeters the element will be displayed with the same amount of millimeters of length whether in the screen or the printer (screen DPI and printer DPI must be correctly configured).
- Specified by:
setReferenceSystemin interfaceCartographicSupport
-
isInPixels
public boolean isInPixels()
-