Enum Class AspectFixMode

java.lang.Object
java.lang.Enum<AspectFixMode>
dev.avelar.mapnik.AspectFixMode
All Implemented Interfaces:
Serializable, Comparable<AspectFixMode>, Constable

public enum AspectFixMode extends Enum<AspectFixMode>
What MapnikMap.zoomToBox(double, double, double, double) does when the requested box does not have the same aspect ratio as the map's pixel size. The order matches Mapnik's enum.
  • Enum Constant Details

    • GROW_BBOX

      public static final AspectFixMode GROW_BBOX
      Grow the box's width or height to fill the map size. The default.
    • GROW_CANVAS

      public static final AspectFixMode GROW_CANVAS
      Grow the map's width or height to fit the box.
    • SHRINK_BBOX

      public static final AspectFixMode SHRINK_BBOX
      Shrink the box's width or height to fill the map size.
    • SHRINK_CANVAS

      public static final AspectFixMode SHRINK_CANVAS
      Shrink the map's width or height to fit the box.
    • ADJUST_BBOX_WIDTH

      public static final AspectFixMode ADJUST_BBOX_WIDTH
      Adjust the box's width; leave its height and the map size.
    • ADJUST_BBOX_HEIGHT

      public static final AspectFixMode ADJUST_BBOX_HEIGHT
      Adjust the box's height; leave its width and the map size.
    • ADJUST_CANVAS_WIDTH

      public static final AspectFixMode ADJUST_CANVAS_WIDTH
      Adjust the map's width; leave its height and the box.
    • ADJUST_CANVAS_HEIGHT

      public static final AspectFixMode ADJUST_CANVAS_HEIGHT
      Adjust the map's height; leave its width and the box.
    • RESPECT

      public static final AspectFixMode RESPECT
      Do nothing: the box is used exactly, so pixels may be stretched.
  • Method Details

    • values

      public static AspectFixMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AspectFixMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null