java.lang.Object
org.mapfish.print.processor.map.scalebar.Label

public class Label extends Object
Position, size and content of a label.
  • Constructor Details

    • Label

      public Label(float graphicOffset, TextLayout labelLayout, Graphics2D graphics2D)
      Constructor.
      Parameters:
      graphicOffset - Position offset.
      labelLayout - Layout for the label.
      graphics2D - Where it is going to be rendered (more accurate size computation
  • Method Details

    • getRotatedHeight

      public static float getRotatedHeight(Dimension dimension, float angle)
      Parameters:
      dimension - Unrotated dimension
      angle - Angle
      Returns:
      The height of the rotated label
    • getRotatedWidth

      public static float getRotatedWidth(Dimension dimension, float angle)
      Parameters:
      dimension - Unrotated dimension
      angle - Angle
      Returns:
      The width of the rotated label
    • getWidth

      public final float getWidth()
    • getHeight

      public final float getHeight()
    • getGraphicOffset

      public final float getGraphicOffset()
    • getLabelLayout

      public final TextLayout getLabelLayout()
    • getRotatedWidth

      public float getRotatedWidth(float angle)
      Parameters:
      angle - Angle
      Returns:
      The width of the rotated label
    • getRotatedHeight

      public float getRotatedHeight(float angle)
      Parameters:
      angle - Angle
      Returns:
      The height of the rotated label