Class Win32DPIUtils

java.lang.Object
org.eclipse.swt.internal.Win32DPIUtils

public class Win32DPIUtils extends Object
This class is used in the win32 implementation only to provide DPI related utility methods.

IMPORTANT: This class is not part of the public API for SWT. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms, and should never be called from application code.

Restriction:
This class is not intended to be referenced by clients
  • Constructor Details

    • Win32DPIUtils

      public Win32DPIUtils()
  • Method Details

    • setDPIAwareness

      public static boolean setDPIAwareness(int desiredDpiAwareness)
    • runWithProperDPIAwareness

      public static <T> T runWithProperDPIAwareness(Supplier<T> operation)
    • scaleDown

      public static float[] scaleDown(float[] size, int zoom)
    • scaleDown

      public static float[] scaleDown(Drawable drawable, float[] size, int zoom)
    • scaleDown

      public static int scaleDown(Drawable drawable, int size, int zoom)
    • scaleDown

      public static float scaleDown(Drawable drawable, float size, int zoom)
    • scaleDown

      public static Point scaleDown(Point point, int zoom)
    • scaleDown

      public static Point scaleDown(Drawable drawable, Point point, int zoom)
    • scaleDown

      public static Rectangle scaleDown(Rectangle rect, int zoom)
    • scaleDown

      public static Rectangle scaleDown(Drawable drawable, Rectangle rect, int zoom)
    • scaleBounds

      public static Rectangle scaleBounds(Rectangle rect, int targetZoom, int currentZoom)
      Returns a new rectangle as per the scaleFactor.
    • scaleUp

      public static int[] scaleUp(int[] pointArray, int zoom)
    • scaleUp

      public static int[] scaleUp(Drawable drawable, int[] pointArray, int zoom)
    • scaleUp

      public static int scaleUp(int size, int zoom)
      Auto-scale up int dimensions to match the given zoom level
    • scaleUp

      public static int scaleUp(Drawable drawable, int size, int zoom)
    • scaleUp

      public static float scaleUp(float size, int zoom)
    • scaleUp

      public static float scaleUp(Drawable drawable, float size, int zoom)
    • scaleUp

      public static Point scaleUp(Point point, int zoom)
    • scaleUp

      public static Point scaleUp(Drawable drawable, Point point, int zoom)
    • scaleUp

      public static Rectangle scaleUp(Rectangle rect, int zoom)
    • scaleUp

      public static Rectangle scaleUp(Drawable drawable, Rectangle rect, int zoom)