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 classAutoScale ImageDataProvider. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TrunWithProperDPIAwareness(Supplier<T> operation) static RectanglescaleBounds(Rectangle rect, int targetZoom, int currentZoom) Returns a new rectangle as per the scaleFactor.static float[]scaleDown(float[] size, int zoom) static float[]static floatstatic intstatic Pointstatic Rectanglestatic Pointstatic Rectanglestatic floatscaleUp(float size, int zoom) static int[]scaleUp(int[] pointArray, int zoom) static intscaleUp(int size, int zoom) Auto-scale up int dimensions to match the given zoom levelstatic floatstatic int[]static intstatic Pointstatic Rectanglestatic Pointstatic Rectanglestatic booleansetDPIAwareness(int desiredDpiAwareness)
-
Constructor Details
-
Win32DPIUtils
public Win32DPIUtils()
-
-
Method Details
-
setDPIAwareness
public static boolean setDPIAwareness(int desiredDpiAwareness) -
runWithProperDPIAwareness
-
scaleDown
public static float[] scaleDown(float[] size, int zoom) -
scaleDown
-
scaleDown
-
scaleDown
-
scaleDown
-
scaleDown
-
scaleDown
-
scaleDown
-
scaleBounds
Returns a new rectangle as per the scaleFactor. -
scaleUp
public static int[] scaleUp(int[] pointArray, int zoom) -
scaleUp
-
scaleUp
public static int scaleUp(int size, int zoom) Auto-scale up int dimensions to match the given zoom level -
scaleUp
-
scaleUp
public static float scaleUp(float size, int zoom) -
scaleUp
-
scaleUp
-
scaleUp
-
scaleUp
-
scaleUp
-