LuciadCPillar C# 2023.1.04
|
This class is used to represent distances between screen locations. More...
Public Member Functions | |
ScreenDistance (double distance, Luciad.Input.ScreenDistanceUnit unit) | |
double | AsMillimeters (double dpi, double displayScale) |
Converting value method which returns the distance value as a double, expressed in millimeters. More... | |
double | AsPixels (double dpi, double displayScale) |
Converting value method which returns the distance value as a double, expressed in device independent pixels. More... | |
void | Dispose () |
Static Public Member Functions | |
static Luciad.Input.ScreenDistance | Millimeters (double millimeters) |
Utility factory method for constructing a ScreenDistance expressed in millimeters. More... | |
static Luciad.Input.ScreenDistance | Pixels (double pixels) |
Utility factory method for constructing a ScreenDistance expressed in device independent pixels. More... | |
Properties | |
Luciad.Input.ScreenDistanceUnit | Unit [get] |
double | Value [get] |
This class is used to represent distances between screen locations.
It consists of a unit (expressed as a ScreenDistanceUnit) and the distance value. This class contains utility methods for converting distance values from millimeters to pixels or vice-versa, by taking DPI and display scale into account (see ScreenDistance::asPixels and ScreenDistance::asMillimeters). Related article: Support high-resolution (HiDPI) displays. 2022.0
|
inline |
|
inline |
Converting value method which returns the distance value as a double, expressed in millimeters.
In order to make any possible conversion from device independent pixels to millimeters, the display DPI and display scale must be provided. If the stored unit is ScreenDistanceUnit::Millimeters, the currently stored value is returned.
dpi
the display density in dots per inch
displayScale
the display scale
the screen distance in millimeters, as a double.
|
inline |
Converting value method which returns the distance value as a double, expressed in device independent pixels.
In order to make any possible conversion from millimeters to pixels, the display DPI and display scale must be provided. If the stored unit is ScreenDistanceUnit::Pixels, the currently stored value is returned.
dpi
the display density in dots per inch
displayScale
the display scale
the screen distance in device independent pixels, as a double.
|
inline |
|
inlinestatic |
Utility factory method for constructing a ScreenDistance expressed in millimeters.
millimeters
the distance in millimeters.
a ScreenDistance instance taking the passed value and expressed in millimeters.
|
inlinestatic |
Utility factory method for constructing a ScreenDistance expressed in device independent pixels.
pixels
the distance in device independent pixels.
a ScreenDistance instance taking the passed value and expressed in device independent pixels.
|
get |
|
get |