Package org.eclipse.swt.internal
Class Win32DPIUtils
java.lang.Object
org.eclipse.swt.internal.Win32DPIUtils
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
AutoScale ImageDataProvider. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static float[]
pixelToPoint
(float[] size, int zoom) static float[]
pixelToPoint
(Drawable drawable, float[] size, int zoom) static float
pixelToPoint
(Drawable drawable, float size, int zoom) static int
pixelToPoint
(Drawable drawable, int size, int zoom) static Point
pixelToPoint
(Drawable drawable, Point point, int zoom) static Rectangle
pixelToPoint
(Drawable drawable, Rectangle rect, int zoom) static Point
pixelToPoint
(Point point, int zoom) static Rectangle
pixelToPoint
(Rectangle rect, int zoom) static float
pointToPixel
(float size, int zoom) static int[]
pointToPixel
(int[] pointArray, int zoom) static int
pointToPixel
(int size, int zoom) Auto-scale up int dimensions to match the given zoom levelstatic float
pointToPixel
(Drawable drawable, float size, int zoom) static int[]
pointToPixel
(Drawable drawable, int[] pointArray, int zoom) static int
pointToPixel
(Drawable drawable, int size, int zoom) static Point
pointToPixel
(Drawable drawable, Point point, int zoom) static Rectangle
pointToPixel
(Drawable drawable, Rectangle rect, int zoom) static Point
pointToPixel
(Point point, int zoom) static Rectangle
pointToPixel
(Rectangle rect, int zoom) static <T> T
runWithProperDPIAwareness
(Display display, Supplier<T> operation) static Rectangle
scaleBounds
(Rectangle rect, int targetZoom, int currentZoom) Returns a new rectangle as per the scaleFactor.static void
static boolean
setDPIAwareness
(int desiredDpiAwareness) static void
setMonitorSpecificScaling
(boolean activate)
-
Constructor Details
-
Win32DPIUtils
public Win32DPIUtils()
-
-
Method Details
-
setDPIAwareness
public static boolean setDPIAwareness(int desiredDpiAwareness) -
runWithProperDPIAwareness
-
pixelToPoint
public static float[] pixelToPoint(float[] size, int zoom) -
pixelToPoint
-
pixelToPoint
-
pixelToPoint
-
pixelToPoint
-
pixelToPoint
-
pixelToPoint
-
pixelToPoint
-
scaleBounds
Returns a new rectangle as per the scaleFactor. -
pointToPixel
public static int[] pointToPixel(int[] pointArray, int zoom) -
pointToPixel
-
pointToPixel
public static int pointToPixel(int size, int zoom) Auto-scale up int dimensions to match the given zoom level -
pointToPixel
-
pointToPixel
public static float pointToPixel(float size, int zoom) -
pointToPixel
-
pointToPixel
-
pointToPixel
-
pointToPixel
-
pointToPixel
-
setMonitorSpecificScaling
public static void setMonitorSpecificScaling(boolean activate) -
setAutoScaleForMonitorSpecificScaling
public static void setAutoScaleForMonitorSpecificScaling() -
isMonitorSpecificScalingActive
public static boolean isMonitorSpecificScalingActive()
-