public interface IDpiConverter
This interface is inspired by Riena and the corresponding talk at EclipseCon 2014 Scaling SWT on high-resolution screens
| Modifier and Type | Method and Description |
|---|---|
int |
convertDpiToPixel(int dpi)
Converts the given DPI scaled value to a pixel value.
|
int |
convertPixelToDpi(int pixel)
Converts the given amount of pixels to a DPI scaled value.
|
float |
getCurrentDpiFactor() |
int |
getDpi()
Returns the dots per inch of the display.
|
int getDpi()
float getCurrentDpiFactor()
int convertPixelToDpi(int pixel)
pixel - the amount of pixels to convert.int convertDpiToPixel(int dpi)
dpi - the DPI value to convert.Copyright © 2016. All rights reserved.