capabilities.screenDPI Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
capabilities.screenDPI Property Flash 6

the number of pixels per inch displayed by the screen, typically 72 dpi read/write
System.capabilities.screenDPI

Description

The integer screenDPI property indicates the number of dots (pixels) per inch displayed by the screen. Typical desktop computer monitors display at 72 pixels per inch. Small handheld devices may display much lower or higher pixels per inch. Relatively speaking, the higher the screenDPI, the smaller elements in a movie will appear.

Though two screens may have the same horizontal and vertical resolution, the actual display size of a movie can vary greatly according to the physical dimensions of the screen and the number of pixels per inch. For example, consider two screens, each with a resolution of 100 x 100. If one screen is 2 inches square (50 pixels per inch) and the other is 5 inches square (20 pixels per inch), then a 10-pixel font will be one-fifth of an inch high on the first screen, and half an inch high on the second. Depending on the differences between screens, text can easily be readable on one screen and illegible on another. By checking the screenDPI, screenResolutionX, and screenResolutionY properties, a movie can scale its contents to be legible on the given display.

The corresponding server string for screenDPI is DP, with a possible value of any integer. See capabilities.serverString for details.

Usage

Print designers will recognize the use of the acronym DPI (dots per inch) as a slight misnomer. Canonically, "DPI" applies to the printed page, while "PPI" (pixels per inch) applies to the screen. The imprecision, however, is here to stay. Note that it is pixels per linear inch, not pixels per square inch.

See Also

capabilities.pixelAspectRatio, capabilities.screenResolutionX, capabilities.screenResolutionY, Stage.scaleMode



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net