©2010
Generated by JsDoc Toolkit 2.4.0 on Mon Apr 04 2011 02:43:32 GMT-0000 (UTC)
HTML template: Codeview

Class PowerCanvas


Defined in: gamelib.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
PowerCanvas provides a convenient wrapper for working with Context2d.
Method Summary
Method Attributes Method Name and Description
 
fillCircle(x, y, radius, color)
Fills a circle at the specified position with the specified radius and color.
 
fillRect(x, y, width, height)
Fills a rectangle with the current fillColor at the specified position with the specified width and height
 
withTransform(matrix, block)
Passes this canvas to the block with the given matrix transformation applied.
Class Detail
PowerCanvas()
PowerCanvas provides a convenient wrapper for working with Context2d.
Method Detail
fillCircle(x, y, radius, color)
Fills a circle at the specified position with the specified radius and color.
Parameters:
{Number} x
{Number} y
{Number} radius
{Number} color
Returns:
this
See:
PowerCanvas#fillColor
fillRect(x, y, width, height)
Fills a rectangle with the current fillColor at the specified position with the specified width and height
Parameters:
{Number} x
{Number} y
{Number} width
{Number} height
Returns:
this
See:
PowerCanvas#fillColor
withTransform(matrix, block)
Passes this canvas to the block with the given matrix transformation applied. All drawing methods called within the block will draw into the canvas with the transformation applied. The transformation is removed at the end of the block, even if the block throws an error.
Parameters:
{Matrix} matrix
{Function} block
Returns:
this