Class DpiUtils


  • public class DpiUtils
    extends Object
    A collection of methods to help with DPI-aware layouts and sizings.
    • Constructor Detail

      • DpiUtils

        public DpiUtils()
    • Method Detail

      • adjustForDesktopScaling

        public static int adjustForDesktopScaling​(int px)
      • adjustForDesktopScaling

        public static float adjustForDesktopScaling​(float px)
      • getDefaultDpi

        public static int getDefaultDpi()
        Get the default pixels-per-inch value. This can be affected in various ways on Linux and Windows, primarily through adjustable text-scaling.