Detailed Description

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...
 

Constructor & Destructor Documentation

PowerUI.DesignSize.DesignSize ( int  width,
int  height 
)
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.

Parameters
widthThe width of your design.
heightThe height of your design.
PowerUI.DesignSize.DesignSize ( int  width,
int  height,
int  dpi 
)
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.

Parameters
widthThe width of your design.
heightThe height of your design.

Member Function Documentation

float PowerUI.DesignSize.ToInches ( int  px)
inlineprivate

Gets the given pixel size as a size in inches.

Parameters
pxThe pixel size.
Returns
The size in inches.

Member Data Documentation

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.

Property Documentation

float PowerUI.DesignSize.Scale
get

The resolution scale of this design size for the current screen.