file-name-resolver module

This commit is contained in:
vakrilov
2015-03-17 17:20:15 +02:00
parent 9e15302db3
commit 0b2c4cc523
14 changed files with 299 additions and 13 deletions

View File

@ -73,7 +73,9 @@ export class screen implements definition.screen {
mainScreenInfo = {
widthPixels: metrics.widthPixels,
heightPixels: metrics.heightPixels,
scale: metrics.density
scale: metrics.density,
widthDIPs: metrics.widthPixels / metrics.density,
heightDIPs: metrics.heightPixels / metrics.density
}
}
return mainScreenInfo;

View File

@ -61,6 +61,16 @@ declare module "platform" {
*/
heightPixels: number;
/**
* Gets the absolute width of the screen in density independent pixels.
*/
widthDIPs: number;
/**
* Gets the absolute height of the screen in density independent pixels.
*/
heightDIPs: number;
/**
* The logical density of the display. This is a scaling factor for the Density Independent Pixel unit.
*/

View File

@ -71,7 +71,9 @@ export class screen implements definition.screen {
mainScreenInfo = {
widthPixels: size.width * scale,
heightPixels: size.height * scale,
scale: scale
scale: scale,
widthDIPs: size.width,
heightDIPs: size.height
}
}
}