OverviewSingleDeprecated

jsx3.vector

class Stroke

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

class Stroke
extends jsx3.html.Tag
Represents a vector line style.

Constructor Summary
void
init(color : int | String, width : int, alpha : float)
The instance initializer.
Method Summary
float
Returns the alpha field.
int | String
Returns the color field.
String
Returns the color field, as a CSS hex string.
int
Returns the width field.
void
setAlpha(alpha : float)
Sets the alpha field.
void
setColor(color : int | String)
Sets the color field.
void
setWidth(width : int)
Sets the width field.
static VectorStroke
parses a VectorStroke from a string representation, that format is "color width alpha"
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, width : int, alpha : float)
The instance initializer.

Parameters:

colorthe color value, as a hex String or 24-bit integer value, defaults to 0x000000
widththe width of the stroke, in pixels, defaults to 1
alphathe opacity value, valid values are between 0 and 1, defaults to 1
Method Detail

getAlpha

float getAlpha()
Returns the alpha field.

Returns:

alpha  

getColor

int | String getColor()
Returns the color field.

Returns:

color  

getColorHtml

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

Returns:

 

getWidth

int getWidth()
Returns the width field.

Returns:

width  

setAlpha

void setAlpha(alpha : float)
Sets the alpha field.

Parameters:

alphathe new value for alpha

setColor

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

Parameters:

colorthe new value for color

setWidth

void setWidth(width : int)
Sets the width field.

Parameters:

widththe new value for width

valueOf

static VectorStroke valueOf(v : String)
parses a VectorStroke from a string representation, that format is "color width alpha"

Parameters:

vthe string representation

Returns:

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