Class AbstractCartographicSupport

java.lang.Object
org.gvsig.symbology.fmap.mapcontext.rendering.symbol.impl.AbstractCartographicSupport
All Implemented Interfaces:
CartographicSupport
Direct Known Subclasses:
AbstractSymbol

public abstract class AbstractCartographicSupport extends Object implements CartographicSupport
Author:
fdiaz
  • Constructor Details

    • AbstractCartographicSupport

      public AbstractCartographicSupport()
  • Method Details

    • setCartographicContext

      public void setCartographicContext(ViewPort viewPort, double dpi, org.gvsig.fmap.geom.Geometry geom)
      Specified by:
      setCartographicContext in interface CartographicSupport
    • setCartographicContext

      public void setCartographicContext(ViewPort viewPort, org.gvsig.compat.print.PrintAttributes properties, org.gvsig.fmap.geom.Geometry geometry)
      Specified by:
      setCartographicContext in interface CartographicSupport
    • setCartographicContext

      public void setCartographicContext(double dpi)
      Specified by:
      setCartographicContext in interface CartographicSupport
    • setCartographicContext

      public void setCartographicContext(org.gvsig.compat.print.PrintAttributes properties)
      Specified by:
      setCartographicContext in interface CartographicSupport
    • getCartographicContext

      public CartographicSupport.CartographicContext getCartographicContext()
      Specified by:
      getCartographicContext in interface CartographicSupport
    • toCartographicUnits

      public double toCartographicUnits(double value)
      Specified by:
      toCartographicUnits in interface CartographicSupport
    • setCartographicContext

      public void setCartographicContext(CartographicSupport.CartographicContext ctx)
      Specified by:
      setCartographicContext in interface CartographicSupport
    • copyCartographicContext

      public void copyCartographicContext(CartographicSupport element)
      Specified by:
      copyCartographicContext in interface CartographicSupport
    • setUnit

      public void setUnit(int unitIndex)
      Description copied from interface: CartographicSupport
      Defines the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.
      Specified by:
      setUnit in interface CartographicSupport
      Parameters:
      unitIndex - , the index of the unit in the MapContext.NAMES array
    • getUnit

      public int getUnit()
      Description copied from interface: CartographicSupport
      Returns the unit used to express measures. It is the position of the unit in the MapContext.NAMES array.
      Specified by:
      getUnit in interface CartographicSupport
    • getReferenceSystem

      public int getReferenceSystem()
      Description copied from interface: CartographicSupport
      Returns 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:
      getReferenceSystem in interface CartographicSupport
      Returns:
    • setReferenceSystem

      public void setReferenceSystem(int system)
      Description copied from interface: CartographicSupport
      Sets the Reference System that defines how this units have to be handled. Possible values are:
      1. 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.
      2. 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:
      setReferenceSystem in interface CartographicSupport
    • isInPixels

      public boolean isInPixels()