OverviewSingleDeprecated

jsx3.vector

class Fill

Object
->jsx3.lang.Object
  ->jsx3.html.Tag
    ->jsx3.vector.Fill

class Fill
extends jsx3.html.Tag
Represents a vector fill, the color and gradient that fills a solid vector shape.

Constructor Summary
void
init(color : int | String, alpha : float)
The instance initializer.
Method Summary
float
Returns the alpha field, as previously set in the constructor or with setAlpha().
float
Returns the alpha2 field, as set with setAlpha2().
int
Returns the angle field (the angle along which the gradient goes), as set with setAngle().
void
Returns the color field, as previously set in the constructor or with setColor().
void
Returns the color2 field, as set with setColor2().
void
? getColor2Html() {String} gets the color2 field, as a CSS hex string
String
Returns the color field, as a CSS hex string.
String
Returns the colors field, as set with setColors().
String
Returns the type field, as set with setType().
void
setAlpha(alpha : float)
Sets the alpha field, valid values are between 0 (transparent) and 1 (opaque).
void
setAlpha2(alpha2 : float)
Sets the alpha2 field, valid values are between 0 (transparent) and 1 (opaque).
void
setAngle(angle : int)
Sets the angle field, valid values are between 0 and 360.
void
setColor(color : String | Number)
Sets the color field.
void
setColor2(color2 : String | Number)
Sets the color2 field.
void
setColors(colors : String)
Sets the colors field, see the documentation for in the VML documentation.
void
setType(type : String)
Sets the type field, valid values are enumerated in the VML specification, though only 'solid', 'gradient', and 'gradientradial' are truly supported by this class.
static jsx3.vector.Fill
Parses a vector fill from its string representation.
Methods Inherited From jsx3.html.Tag
appendChild, getChildren, getClassName, getFirstChildOfType, getId, getParent, getProperty, getStyle, getTagNS, getTagName, onAppendChild, onRemoveChild, paint, paintDom, paintUpdate, release, removeChild, removeChildren, removeProperty, removeStyle, replaceChild, setClassName, setExtraStyles, setId, setProperty, setStyle, toString
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Constructor Detail

init

void init(color : int | String, alpha : float)
The instance initializer.

Parameters:

colorthe color value, as a hex String or 24-bit integer value, defaults to 0x000000
alphathe opacity value, valid values are between 0 and 1, defaults to 1
Method Detail

getAlpha

float getAlpha()
Returns the alpha field, as previously set in the constructor or with setAlpha().

Returns:

alpha  

getAlpha2

float getAlpha2()
Returns the alpha2 field, as set with setAlpha2().

Returns:

alpha2  

getAngle

int getAngle()
Returns the angle field (the angle along which the gradient goes), as set with setAngle().

Returns:

angle  

getColor

void getColor()
Returns the color field, as previously set in the constructor or with setColor().

getColor2

void getColor2()
Returns the color2 field, as set with setColor2().

getColor2Html

void getColor2Html()
? getColor2Html() {String} gets the color2 field, as a CSS hex string

getColorHtml

String getColorHtml()
Returns the color field, as a CSS hex string.

Returns:

 

getColors

String getColors()
Returns the colors field, as set with setColors().

Returns:

colors  

getType

String getType()
Returns the type field, as set with setType().

Returns:

type  

setAlpha

void setAlpha(alpha : float)
Sets the alpha field, valid values are between 0 (transparent) and 1 (opaque)..

Parameters:

alphathe new value for alpha

setAlpha2

void setAlpha2(alpha2 : float)
Sets the alpha2 field, valid values are between 0 (transparent) and 1 (opaque)..

Parameters:

alpha2the new value for alpha2

setAngle

void setAngle(angle : int)
Sets the angle field, valid values are between 0 and 360. 0 is the vector pointing rightward.

Parameters:

anglethe new value for angle

setColor

void setColor(color : String | Number)
Sets the color field.

Parameters:

colorthe new value for color

setColor2

void setColor2(color2 : String | Number)
Sets the color2 field.

Parameters:

color2the new value for color2

setColors

void setColors(colors : String)
Sets the colors field, see the documentation for <fill> in the VML documentation.

Parameters:

colorsthe new value for colors

setType

void setType(type : String)
Sets the type field, valid values are enumerated in the VML specification, though only 'solid', 'gradient', and 'gradientradial' are truly supported by this class.

Parameters:

typethe new value for type

valueOf

static jsx3.vector.Fill valueOf(v : String | jsx3.vector.Fill)
Parses a vector fill from its string representation. The format is "color alpha".

Parameters:

vthe string representation of a fill.

Returns:

null if v is empty, v if v is already a vector fill, or otherwise a new vector fill created by parsing the string according to the format specified above.