Class LengthUtil


  • public final class LengthUtil
    extends Object
    Author:
    Teodor Danciu (teodord@users.sourceforge.net)
    • Method Detail

      • inch

        public static double inch​(double pixels)
        Converts pixels to inches without decimal truncation.
      • inchFloor2Dec

        public static double inchFloor2Dec​(double pixels)
      • inchFloor4Dec

        public static double inchFloor4Dec​(double pixels)
      • inchRound2Dec

        public static double inchRound2Dec​(double pixels)
      • inchRound4Dec

        public static double inchRound4Dec​(double pixels)
      • twip

        public static int twip​(float points)
        Convert a float value to twips (multiply with 20)
        Parameters:
        points - value that need to be converted
        Returns:
        converted value in twips
      • emu

        public static int emu​(float points)
        Convert an int value from points to EMU (multiply with 12700)
        Parameters:
        points - value that needs to be converted
        Returns:
        converted value in EMU
      • halfPoint

        public static int halfPoint​(float pixels)