Language Version : ActionScript 3.0
Product Version : Flex 4.13
Runtime Versions : AIR 3.0
Represents a dimension with an optional unit, to be used in css media queries.
Valid units are:
no unit
px : pixel
in : inch
cm : centimeter
pt : point
dp : device independent pixel ( 1 pix at about 160 DPI )
pixelValue:Number
[read-only]
Dimension converted to actual pixels, considering the current device DPI
Implementation public function get pixelValue():Number
unit:String
[read-only]
Dimension unit, as a string, or empty string if no unit
Implementation public function get unit():String
value:Number
[read-only]
Dimension value as a number, without the unit
Implementation public function get value():Number
public function CSSDimension(value:Number, refDPI:Number, unit:String)
Constructor
Parameters value :Number
refDPI :Number
unit :String
(default = NaN
)
public function compareTo(other:CSSDimension ):int
Language Version : ActionScript 3.0
Product Version : Flex 4.13
Runtime Versions : AIR 3.0
Compares to another CSSDimension instance.
Actual pixel values are used for comparison, so dimensions can have different units.
Parameters
Returns int
— 0 if both dimensions are of equal value. rounding errors may occur due to conversion
-1 if this
is lower than other
.
1 if this
is greater than other
.
public function toString():String
Printable string of the dimension
Returns String
— version as a string
public static const NO_UNIT:String
public static const UNIT_CM:String = cm
public static const UNIT_DP:String = dp
public static const UNIT_INCH:String = in
public static const UNIT_PT:String = pt
The Apache Software Foundation Wed Mar 25 2015, 07:57 PM +01:00