OverviewSingleDeprecated

jsx3.vector

class Polygon

Object
->jsx3.lang.Object
  ->jsx3.html.Tag
    ->jsx3.html.BlockTag
      ->jsx3.vector.Tag
        ->jsx3.vector.Shape
          ->jsx3.vector.Polygon

class Polygon
extends jsx3.vector.Shape
Paints a vector polygon defined by a set of points.

Constructor Summary
void
init(left : int, top : int, points : String | Array)
The instance initializer.
Method Summary
void
setPoints(points : Array)
Sets the polygon points as an array of point objects or strings.
void
Sets the polygon points as an array of coordinates.
void
Sets the points as a string.
Methods Inherited From jsx3.vector.Shape
getFill, getPath, getStroke, pathArcTo, pathClose, pathLineTo, pathMoveTo, setFill, setPath, setStroke
Methods Inherited From jsx3.vector.Tag
getRotation, getToolTip, setRotation, setToolTip
Methods Inherited From jsx3.html.BlockTag
getBackgroundColor, getDimensions, getHeight, getLeft, getMargin, getMarginDimensions, getPadding, getPaddingDimensions, getPosition, getTop, getWidth, getZIndex, setBackgroundColor, setDimensions, setHeight, setLeft, setMargin, setPadding, setPosition, setTop, setWidth, setZIndex
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(left : int, top : int, points : String | Array)
The instance initializer.

Parameters:

leftleft position (in pixels) of the object relative to its parent container
toptop position (in pixels) of the object relative to its parent container
pointsthe list of points comprising the polygon
Method Detail

setPoints

void setPoints(points : Array)
Sets the polygon points as an array of point objects or strings.

Parameters:

pointsan array of strings or objects to stringify as "x y"

setPointsAsNumberArray

void setPointsAsNumberArray(points : Array)
Sets the polygon points as an array of coordinates.

Parameters:

pointsan array of alternating x and y coordinates

setPointsAsString

void setPointsAsString(points : String)
Sets the points as a string.

Parameters:

pointsa string in the form "x1 y1 x2 y2 ..."