Class Index | File Index

Classes


Class ArcadeCanvas


Extends Canvas.

Defined in: arcade.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Augmented HTML 5 canvas.
Method Summary
Method Attributes Method Name and Description
<static>  
ArcadeCanvas.fillCircle2()
Render a filled circle to a canvas.
<static>  
ArcadeCanvas.fillPolygon2(pg)
Render a filled Polygon2 to a canvas.
<static>  
ArcadeCanvas.fillScreenText(text, x, y)
<static>  
ArcadeCanvas.resetTransform()
Set context transformation to identity (so we can use pixel coordinates).
<static>  
ArcadeCanvas.setTransformMatrix3(m)
Set transformation matrix.
<static>  
ArcadeCanvas.strokeCircle2()
Render a circle outline to a canvas.
<static>  
ArcadeCanvas.strokePoint2(pt, size)
Render a Point2 to the canvas.
<static>  
ArcadeCanvas.strokePolygon2(pg, closed)
Render a Polygon2 outline to a canvas.
<static>  
ArcadeCanvas.strokeScreenText(text, x, y)
Render a text field to the canvas using canvas coordinates.
<static>  
ArcadeCanvas.strokeVec2(vec, origin, tipSize)
Render a vector to the canvas.
<static>  
ArcadeCanvas.transformMatrix3(m)
Apply transformation matrix.
Class Detail
ArcadeCanvas()
Augmented HTML 5 canvas. This functions are added to a ArcadeJS canvas.
See:
The canvas element
Canvas tutorial
Method Detail
<static> ArcadeCanvas.fillCircle2()
Render a filled circle to a canvas.
See:
strokeCircle2

<static> ArcadeCanvas.fillPolygon2(pg)
Render a filled Polygon2 to a canvas.
Parameters:
{Polygon2} pg

<static> ArcadeCanvas.fillScreenText(text, x, y)
Parameters:
text
x
y

<static> ArcadeCanvas.resetTransform()
Set context transformation to identity (so we can use pixel coordinates).

<static> ArcadeCanvas.setTransformMatrix3(m)
Set transformation matrix. This method takes care of transposing m, so it fits the canvas representation. The matrix is treated as affine (last row being [0 0 1]).
Parameters:
{Matrix3} m

<static> ArcadeCanvas.strokeCircle2()
Render a circle outline to a canvas.
strokeCircle2(circle2)
strokeCircle2(point2, radius)
strokeCircle2(center.x, center.y, radius)

<static> ArcadeCanvas.strokePoint2(pt, size)
Render a Point2 to the canvas.
Parameters:
{Point2} pt
{float} size
(optional) default: 4

<static> ArcadeCanvas.strokePolygon2(pg, closed)
Render a Polygon2 outline to a canvas.
Parameters:
{Polygon2} pg
{Boolean} closed
(optional) default: true

<static> ArcadeCanvas.strokeScreenText(text, x, y)
Render a text field to the canvas using canvas coordinates. Negative coordinates will align to opposite borders. Pass x = 0 or y = 0 for centered output.
Parameters:
{string} text
{float} x
Horizontal position in CC (use negative value to align at right border)
{float} y
Vertical position in CC (use negative value to align at bottom)

<static> ArcadeCanvas.strokeVec2(vec, origin, tipSize)
Render a vector to the canvas.
Parameters:
{Vec2} vec
{Point2} origin
(optional) default: (0/0)
{float} tipSize
(optional) default: 5

<static> ArcadeCanvas.transformMatrix3(m)
Apply transformation matrix. This method takes care of transposing m, so it fits the canvas representation. The matrix is treated as affine (last row being [0 0 1]).
Parameters:
{Matrix3} m

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 18 2011 14:05:26 GMT+0200 (MESZ)