Class Index | File Index

Classes


Class twodee.PolygonNode


Extends .
A node which draws a polygon.
Defined in: PolygonNode.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
twodee.PolygonNode(polygon, fillStyle, strokeStyle)
Constructs a new polygon node.
Field Summary
Field Attributes Field Name and Description
<static>  
twodee.PolygonNode.counter
Instance counter.
Method Summary
Method Attributes Method Name and Description
 
Returns the fill style.
 
Returns the polygon.
 
Returns the stroke style.
 
render(g)
 
setFillStyle(fillStyle)
Sets the fill style.
 
setPolygon(polygon)
Sets the polygon.
 
setStrokeStyle(strokeStyle)
Sets the stroke style.
Class Detail
twodee.PolygonNode(polygon, fillStyle, strokeStyle)
Constructs a new polygon node.
Parameters:
{twodee.Polygon} polygon
Optional polygon. If not set then it must be set with the setPolygon() method.
{string=} fillStyle
Optional fill style. null means no filling. Default is a white color.
{string=} strokeStyle
Optional stroke style. null means no stroking and this is the default.
Field Detail
<static> twodee.PolygonNode.counter
Instance counter.
Method Detail
{?string} getFillStyle()
Returns the fill style.
Returns:
{?string} The fill style

{twodee.Polygon} getPolygon()
Returns the polygon.
Returns:
{twodee.Polygon} The polygon

{?string} getStrokeStyle()
Returns the stroke style.
Returns:
{?string} The stroke style

render(g)
Parameters:
{CanvasRenderingContext2D} g
The graphics context
See:
twodee.SceneNode#render

setFillStyle(fillStyle)
Sets the fill style. null means no filling.
Parameters:
{?string} fillStyle
The fill style to set

setPolygon(polygon)
Sets the polygon.
Parameters:
{twodee.Polygon} polygon
The polygon to set

setStrokeStyle(strokeStyle)
Sets the stroke style. null means no stroking.
Parameters:
{?string} strokeStyle
The stroke style to set

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Dec 29 2011 20:19:03 GMT+0100 (CET)