Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
MultiDPIBitmapSource

Package | spark.utils
Class | public class MultiDPIBitmapSource
Inheritance | MultiDPIBitmapSource Object

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10.2, AIR 2.6

This class provides a list of bitmaps for various runtime densities. It is supplied as the source to BitmapImage or Image and as the icon of a Button. The components will use the Application.runtimeDPI to choose which image to display.

Public Properties

| Property | Defined By
--- | --- | ---
|  | source120dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_120. | MultiDPIBitmapSource
|  | source160dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_160. | MultiDPIBitmapSource
|  | source240dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_240. | MultiDPIBitmapSource
|  | source320dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_320. | MultiDPIBitmapSource
|  | source480dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_480. | MultiDPIBitmapSource
|  | source640dpi : Object The source to use if the Application.runtimeDPI is DPIClassification.DPI_640. | MultiDPIBitmapSource

Public Methods

| Method | Defined By
--- | --- | ---
|  | getMultiSource():Object Select one of the sourceXXXdpi properties based on the run time DPI. | MultiDPIBitmapSource
|  | getSource(desiredDPI:Number):Object Select one of the sourceXXXdpi properties based on the given DPI. | MultiDPIBitmapSource

Property Detail

source120dpi | property

`public var source120dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | ApacheFlex 4.11

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_120`.

source160dpi | property |

`public var source160dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_160`.

source240dpi | property |

`public var source240dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_240`.

source320dpi | property |

`public var source320dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_320`.

source480dpi | property |

`public var source480dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | ApacheFlex 4.10

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_480`.

source640dpi | property |

`public var source640dpi:Object`

Language Version : | ActionScript 3.0

Product Version : | ApacheFlex 4.11

Runtime Versions : | Flash Player 10.2, AIR 2.6

The source to use if the `Application.runtimeDPI` is `DPIClassification.DPI_640`.

Method Detail

getMultiSource | () | method

`public function getMultiSource():Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 4.11

Runtime Versions : | Flash Player 10.2, AIR 2.6

Select one of the sourceXXXdpi properties based on the run time DPI.

Returns

| `Object` — One of the sourceXXXdpi properties based on the run time DPI.

getSource | () | method |

`public function getSource(desiredDPI:Number):Object`

Language Version : | ActionScript 3.0

Product Version : | Flex 4.5

Runtime Versions : | Flash Player 10.2, AIR 2.6

Select one of the sourceXXXdpi properties based on the given DPI. This function handles the fallback to different sourceXXXdpi properties if the given one is null. The strategy is to try to choose the next highest property if it is not null, then return a lower property if not null, then just return null.

Parameters

| `desiredDPI:Number` — desired DPI.

Returns

| `Object` — One of the sourceXXXdpi properties based on the desired DPI.

Sun Mar 5 2017, 03:42 PM +11:00