IRatioMap

Interface of an object containing the ratio of custom data to devicePixelRatio. Used when needed to support screens with a ratio of virtual to physical pixels greater than one. As keys for the object, use strings consisting of whole numbers or fractions indicating the pixel density coefficient.

Constructor

Constructor

IRatioMap()

Example:

// Let's say we need to display the image correctly.
var images = {
    // For regular screens we'll display the normal picture.
    "1": "100x100.png",
    // For HTC Desire, Samsung Galaxy S II and others with devicePixelRatio = 1.5.
    "1.5": "150x150.png",
    // For Apple devices with the Retina screen, as well as for Sony Xperia S, HTC One X and others
    // with the ratio = 2.
    "2": "200x100.png"
}