org.apache.fop.util

## Class UnitConv

- java.lang.Object
- - org.apache.fop.util.UnitConv

- Deprecated.
  use org.apache.xmlgraphics.util.UnitConv instead.

      public final class UnitConv
      extends Object

  Utility class for unit conversions.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static float` | `IN2CM` Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2CM instead.
    `static float` | `IN2MM` Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2MM instead.
    `static int` | `IN2PT` Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2PT instead.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `in2mm(double in)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2mm(in) instead.
    `static double` | `in2mpt(double in)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2mpt(in) instead.
    `static double` | `in2pt(double in)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2pt(in) instead.
    `static double` | `mm2in(double mm)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
    `static double` | `mm2mpt(double mm)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2mpt(mm) instead.
    `static double` | `mm2pt(double mm)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2pt(mm) instead.
    `static double` | `mm2px(double mm, int resolution)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2px(mm, resolution) instead.
    `static double` | `mpt2in(double mpt)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mpt2in(mpt) instead.
    `static double` | `mpt2px(double mpt, int resolution)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mpt2px(mpt, resolution) instead.
    `static AffineTransform` | `mptToPt(AffineTransform at)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.mptToPt(at) instead.
    `static double` | `pt2mm(double pt)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
    `static AffineTransform` | `ptToMpt(AffineTransform at)` Deprecated. use org.apache.xmlgraphics.util.UnitConv.ptToMpt(at) instead.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### IN2MM

          public static final float IN2MM

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2MM instead.
      conversion factory from millimeters to inches.
      See Also:
        Constant Field Values

    - #### IN2CM

          public static final float IN2CM

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2CM instead.
      conversion factory from centimeters to inches.
      See Also:
        Constant Field Values

    - #### IN2PT

          public static final int IN2PT

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.IN2PT instead.
      conversion factory from inches to points.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### mm2pt

          public static double mm2pt(double mm)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2pt(mm) instead.
      Converts millimeters (mm) to points (pt)
      Parameters:
        `mm` - the value in mm
      Returns:
        the value in pt

    - #### mm2mpt

          public static double mm2mpt(double mm)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2mpt(mm) instead.
      Converts millimeters (mm) to millipoints (mpt)
      Parameters:
        `mm` - the value in mm
      Returns:
        the value in mpt

    - #### pt2mm

          public static double pt2mm(double pt)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
      Converts points (pt) to millimeters (mm)
      Parameters:
        `pt` - the value in pt
      Returns:
        the value in mm

    - #### mm2in

          public static double mm2in(double mm)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
      Converts millimeters (mm) to inches (in)
      Parameters:
        `mm` - the value in mm
      Returns:
        the value in inches

    - #### in2mm

          public static double in2mm(double in)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2mm(in) instead.
      Converts inches (in) to millimeters (mm)
      Parameters:
        `in` - the value in inches
      Returns:
        the value in mm

    - #### in2mpt

          public static double in2mpt(double in)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2mpt(in) instead.
      Converts inches (in) to millipoints (mpt)
      Parameters:
        `in` - the value in inches
      Returns:
        the value in mpt

    - #### in2pt

          public static double in2pt(double in)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.in2pt(in) instead.
      Converts inches (in) to points (pt)
      Parameters:
        `in` - the value in inches
      Returns:
        the value in pt

    - #### mpt2in

          public static double mpt2in(double mpt)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mpt2in(mpt) instead.
      Converts millipoints (mpt) to inches (in)
      Parameters:
        `mpt` - the value in mpt
      Returns:
        the value in inches

    - #### mm2px

          public static double mm2px(double mm,
                                     int resolution)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mm2px(mm, resolution) instead.
      Converts millimeters (mm) to pixels (px)
      Parameters:
        `mm` - the value in mm
        `resolution` - the resolution in dpi (dots per inch)
      Returns:
        the value in pixels

    - #### mpt2px

          public static double mpt2px(double mpt,
                                      int resolution)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mpt2px(mpt, resolution) instead.
      Converts millipoints (mpt) to pixels (px)
      Parameters:
        `mpt` - the value in mpt
        `resolution` - the resolution in dpi (dots per inch)
      Returns:
        the value in pixels

    - #### mptToPt

          public static AffineTransform mptToPt(AffineTransform at)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.mptToPt(at) instead.
      Converts a millipoint-based transformation matrix to points.
      Parameters:
        `at` - a millipoint-based transformation matrix
      Returns:
        a point-based transformation matrix

    - #### ptToMpt

          public static AffineTransform ptToMpt(AffineTransform at)

      Deprecated. use org.apache.xmlgraphics.util.UnitConv.ptToMpt(at) instead.
      Converts a point-based transformation matrix to millipoints.
      Parameters:
        `at` - a point-based transformation matrix
      Returns:
        a millipoint-based transformation matrix

Copyright © 2023 Apache Software Foundation. All rights reserved.