This class represents design size information. Used by UI.Resolution to essentially match the visual appearance of your design on every screen.
Public Member Functions | |
DesignSize (int width, int height) | |
Used to make PowerUI match the visual appearance of a single design across all devices. 72 dpi is assumed. Provide the width and height of your design, and pass this object to a new ResolutionInfo object. It's reccommended that your design is quite large for the best appearance on all devices. More... | |
DesignSize (int width, int height, int dpi) | |
Used to make PowerUI match the visual appearance of a single design across all devices, with a specified DPI of your design. Provide the width and height of your design, and pass this object to a new ResolutionInfo object. It's reccommended that your design is quite large for the best appearance on all devices. More... | |
Public Attributes | |
int | Dpi =72 |
The DPI of this design. The default DPI is 72. More... | |
float | Width |
The inch width of your design. More... | |
float | Height |
The inch width of your design. More... | |
Properties | |
float | Scale [get] |
The resolution scale of this design size for the current screen. More... | |
Private Member Functions | |
float | ToInches (int px) |
Gets the given pixel size as a size in inches. More... | |
|
inline |
Used to make PowerUI match the visual appearance of a single design across all devices. 72 dpi is assumed. Provide the width and height of your design, and pass this object to a new ResolutionInfo object. It's reccommended that your design is quite large for the best appearance on all devices.
width | The width of your design. |
height | The height of your design. |
|
inline |
Used to make PowerUI match the visual appearance of a single design across all devices, with a specified DPI of your design. Provide the width and height of your design, and pass this object to a new ResolutionInfo object. It's reccommended that your design is quite large for the best appearance on all devices.
width | The width of your design. |
height | The height of your design. |
|
inlineprivate |
Gets the given pixel size as a size in inches.
px | The pixel size. |
int PowerUI.DesignSize.Dpi =72 |
The DPI of this design. The default DPI is 72.
float PowerUI.DesignSize.Height |
The inch width of your design.
float PowerUI.DesignSize.Width |
The inch width of your design.
|
get |
The resolution scale of this design size for the current screen.