Class Conversion


  • public class Conversion
    extends java.lang.Object
    a helper class to calculate dot dimensions
    • Constructor Detail

      • Conversion

        public Conversion()
    • Method Detail

      • mmToDots

        public static int mmToDots​(double resolution,
                                   double mm)
      • mmToPixels

        public static int mmToPixels​(double resolution,
                                     double mm)
      • dotsToPixels

        public static int dotsToPixels​(double dots)
      • pixelToDots

        public static int pixelToDots​(double pixels)
      • pixelToDots

        public static int pixelToDots​(double pixels,
                                      int dpi)
      • convertRectangle

        public static Rectangle convertRectangle​(Rectangle rectangle,
                                                 double dpi)
      • zoomRectangleToWidth

        public static Rectangle zoomRectangleToWidth​(Rectangle rectangle,
                                                     int width)
      • inflateRectangle

        public static Rectangle inflateRectangle​(Rectangle rectangle,
                                                 int width,
                                                 int height,
                                                 double dpi)