Class UnitUtil


  • public class UnitUtil
    extends java.lang.Object
    Internal Use Only.

    Utility class for unit conversion.

    Author:
    Jamson Chan
    • Constructor Summary

      Constructors 
      Constructor Description
      UnitUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double cmToInch​(double cm)  
      static double cmToPt​(double cm)  
      static double cmToTwip​(double cm)  
      static double eighthPtToPx​(double eighthPt)  
      static double eighthPtToTwip​(double eighthPt)  
      static double halfPtToPx​(double halfPt)  
      static double halfPtToTwip​(double halfPt)  
      static double inchToCm​(double inch)  
      static double inchToPt​(double inch)  
      static double inchToPx​(double inch)  
      static double ptToCm​(double pt)  
      static double ptToInch​(double pt)  
      static double ptToPx​(double pt)  
      static double ptToTwip​(double pt)  
      static double pxToEighthPt​(double px)  
      static double pxToHalfPt​(double px)  
      static double pxToInch​(double px)  
      static double pxToPt​(double px)  
      static double pxToTwip​(double px)  
      static double twipToCm​(double twip)  
      static double twipToEighthPt​(double twip)  
      static double twipToHalfPt​(double twip)  
      static double twipToPt​(double twip)  
      static double twipToPx​(double twip)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnitUtil

        public UnitUtil()
    • Method Detail

      • pxToInch

        public static double pxToInch​(double px)
      • inchToPx

        public static double inchToPx​(double inch)
      • inchToPt

        public static double inchToPt​(double inch)
      • ptToInch

        public static double ptToInch​(double pt)
      • cmToInch

        public static double cmToInch​(double cm)
      • inchToCm

        public static double inchToCm​(double inch)
      • pxToPt

        public static double pxToPt​(double px)
      • ptToPx

        public static double ptToPx​(double pt)
      • pxToTwip

        public static double pxToTwip​(double px)
      • twipToPx

        public static double twipToPx​(double twip)
      • pxToHalfPt

        public static double pxToHalfPt​(double px)
      • halfPtToPx

        public static double halfPtToPx​(double halfPt)
      • pxToEighthPt

        public static double pxToEighthPt​(double px)
      • eighthPtToPx

        public static double eighthPtToPx​(double eighthPt)
      • ptToTwip

        public static double ptToTwip​(double pt)
      • twipToPt

        public static double twipToPt​(double twip)
      • halfPtToTwip

        public static double halfPtToTwip​(double halfPt)
      • twipToHalfPt

        public static double twipToHalfPt​(double twip)
      • eighthPtToTwip

        public static double eighthPtToTwip​(double eighthPt)
      • twipToEighthPt

        public static double twipToEighthPt​(double twip)
      • ptToCm

        public static double ptToCm​(double pt)
      • cmToPt

        public static double cmToPt​(double cm)
      • twipToCm

        public static double twipToCm​(double twip)
      • cmToTwip

        public static double cmToTwip​(double cm)