Package | impression.persistence.properties |
Class | public class ColorData |
Inheritance | ColorData ![]() |
Property | Defined By | ||
---|---|---|---|
color : uint = 0
The RGB value for the object. | ColorData |
Method | Defined By | ||
---|---|---|---|
ColorData(color:uint = 0)
Creates a new instance of the ColorData class. | ColorData | ||
Returns a copy of the object. | ColorData | ||
fromNamedColor(cssColorName:String):ColorData [static]
Returns a new instance of the ColorData class containing the numeric translation of cssColorName. | ColorData | ||
fromObject(source:Object):ColorData [static]
Returns a new instance of the ColorData class based on the data contained in the object. | ColorData | ||
fromOLEColor(oleColor:int):ColorData [static]
Returns a new instance of the ColorData class containing the Flash/HTML translation of the OLE color
number. | ColorData | ||
[static]
Returns a new instance of the ColorData class containing the rgbValue. | ColorData | ||
fromString(value:String):ColorData [static]
Returns a new instance of the ColorData class containing the numeric translation of value. | ColorData | ||
[static]
Returns a new instance of the ColorData class based on the data contained in the XML object. | ColorData | ||
toObject():Object
Returns an Object containing the color property value as a dynamic property. | ColorData | ||
toString():String
Returns a string containing the HTML-formatted (#RRGGBB) version of the color. | ColorData |
color | property |
public var color:uint = 0
The RGB value for the object.
ColorData | () | Constructor |
public function ColorData(color:uint = 0)
Creates a new instance of the ColorData class.
If color
is null
, then the color
property is set to 0.
color:uint (default = 0 ) — An uint specifying the RGB value for the color property.
|
clone | () | method |
public function clone():ColorData
Returns a copy of the object.
ReturnsColorData — A copy of the object.
|
fromNamedColor | () | method |
public static function fromNamedColor(cssColorName:String):ColorData
Returns a new instance of the ColorData class containing the numeric translation of cssColorName.
Note that the ColorData class only supports the 16 CSS1 colors.
Parameters
cssColorName:String — The CSS1 color. If the value is null or is not one
of the 16 CSS1 colors, the returned object will have a color value of 0.
|
ColorData — A ColorData object condtaining the value specified by cssColorName .
|
fromObject | () | method |
public static function fromObject(source:Object):ColorData
Returns a new instance of the ColorData class based on the data contained in the object.
If source
is null
an empty ColorData object is returned.
Parameters
source:Object — The object containing the data to use. The object should contain
a dynamic property named color .
|
ColorData — A ColorData object containing the data from the source object.
|
fromOLEColor | () | method |
public static function fromOLEColor(oleColor:int):ColorData
Returns a new instance of the ColorData class containing the Flash/HTML translation of the OLE color
number. OLE colors reverse the red and blue bytes (that is, an OLE Color is represented as BBGGRR
rather than RRGGBB). If oleColor
represents a system color (80xxxxxx), black is used.
Parameters
oleColor:int — The OLE Color value.
|
ColorData — A ColorData object containing data specified by the oleColor value.
|
fromRGB | () | method |
public static function fromRGB(rgbValue:uint):ColorData
Returns a new instance of the ColorData class containing the rgbValue.
Parameters
rgbValue:uint — The RGB value.
|
ColorData — A ColorData object containing the RGB value specified by rgbValue .
|
fromString | () | method |
public static function fromString(value:String):ColorData
Returns a new instance of the ColorData class containing the numeric translation of value.
value
must be in one of the three formats:
Parameters
value:String — The data to use for the object.
|
ColorData — A ColorData object containing the RGB value specified by the value
|
fromXML | () | method |
public static function fromXML(source:XML):ColorData
Returns a new instance of the ColorData class based on the data contained in the XML object.
If source
is null
then an empty ColorData object is returned.
The XML format of a ColorData object is:
If the value
attribute is missing, 0 is used.
Parameters
source:XML — The object containing the data to use.
|
ColorData — A ColorData object containing the data from the source XML object.
|
toObject | () | method |
public function toObject():Object
Returns an Object containing the color property value as a dynamic property.
ReturnsObject — An Object containing the color property value.
|
toString | () | method |
public function toString():String
Returns a string containing the HTML-formatted (#RRGGBB) version of the color.
ReturnsString — An HTML-formatted (#RRGGBB) string version of the color.
|