Enum HwmfMapMode

java.lang.Object
java.lang.Enum<HwmfMapMode>
org.apache.poi.hwmf.record.HwmfMapMode
All Implemented Interfaces:
Serializable, Comparable<HwmfMapMode>, java.lang.constant.Constable

public enum HwmfMapMode extends Enum<HwmfMapMode>
A 16-bit unsigned integer that defines the mapping mode. The MapMode defines how logical units are mapped to physical units; that is, assuming that the origins in both the logical and physical coordinate systems are at the same point on the drawing surface, what is the physical coordinate (x',y') that corresponds to logical coordinate (x,y). For example, suppose the mapping mode is MM_TEXT. Given the following definition of that mapping mode, and an origin (0,0) at the top left corner of the drawing surface, logical coordinate (4,5) would map to physical coordinate (4,5) in pixels. Now suppose the mapping mode is MM_LOENGLISH, with the same origin as the previous example. Given the following definition of that mapping mode, logical coordinate (4,-5) would map to physical coordinate (0.04,0.05) in inches.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Logical units are mapped to arbitrary units with arbitrarily scaled axes.
    Each logical unit is mapped to 0.001 inch.
    Each logical unit is mapped to 0.01 millimeter.
    Logical units are mapped to arbitrary device units with equally scaled axes; that is, one unit along the x-axis is equal to one unit along the y-axis.
    Each logical unit is mapped to 0.01 inch.
    Each logical unit is mapped to 0.1 millimeter.
    Each logical unit is mapped to one device pixel.
    Each logical unit is mapped to one twentieth (1/20) of a point.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    native flag
    final int
    transformation units - usually scale relative to current dpi.
  • Method Summary

    Modifier and Type
    Method
    Description
    valueOf(int flag)
    Returns the enum constant of this type with the specified name.
    Returns the enum constant of this type with the specified name.
    static HwmfMapMode[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • MM_TEXT

      public static final HwmfMapMode MM_TEXT
      Each logical unit is mapped to one device pixel. Positive x is to the right; positive y is down.
    • MM_LOMETRIC

      public static final HwmfMapMode MM_LOMETRIC
      Each logical unit is mapped to 0.1 millimeter. Positive x is to the right; positive y is up.
    • MM_HIMETRIC

      public static final HwmfMapMode MM_HIMETRIC
      Each logical unit is mapped to 0.01 millimeter. Positive x is to the right; positive y is up.
    • MM_LOENGLISH

      public static final HwmfMapMode MM_LOENGLISH
      Each logical unit is mapped to 0.01 inch. Positive x is to the right; positive y is up.
    • MM_HIENGLISH

      public static final HwmfMapMode MM_HIENGLISH
      Each logical unit is mapped to 0.001 inch. Positive x is to the right; positive y is up.
    • MM_TWIPS

      public static final HwmfMapMode MM_TWIPS
      Each logical unit is mapped to one twentieth (1/20) of a point. In printing, a point is 1/72 of an inch; therefore, 1/20 of a point is 1/1440 of an inch. This unit is also known as a "twip". Positive x is to the right; positive y is up.
    • MM_ISOTROPIC

      public static final HwmfMapMode MM_ISOTROPIC
      Logical units are mapped to arbitrary device units with equally scaled axes; that is, one unit along the x-axis is equal to one unit along the y-axis. The META_SETWINDOWEXT and META_SETVIEWPORTEXT records specify the units and the orientation of the axes. The processing application SHOULD make adjustments as necessary to ensure the x and y units remain the same size. For example, when the window extent is set, the viewport SHOULD be adjusted to keep the units isotropic.
    • MM_ANISOTROPIC

      public static final HwmfMapMode MM_ANISOTROPIC
      Logical units are mapped to arbitrary units with arbitrarily scaled axes.
  • Field Details

    • flag

      public final int flag
      native flag
    • scale

      public final int scale
      transformation units - usually scale relative to current dpi. when scale == 0, then don't scale when scale == -1, then scale relative to window dimension.
  • Method Details

    • values

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

      public static HwmfMapMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • valueOf

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