new CanvasRenderer(options)
This renders objects to a canvas object, with a 2D context. This
method is not hardware accelerated by default, however is the
most stable and cross-browser.
Parameters:
Name | Type | Argument | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Options to setup the renderer.
Properties
|
- Source:
Members
-
<private> canvas :Grape2D.Canvas
-
A canvas object
Type:
- Source:
Methods
-
appendToDOMElement()
-
- Source:
-
end()
-
- Source:
-
getContext() → {CanvasRenderingContext2D}
-
Gets the 2D context of teh canvas element.
- Source:
Returns:
Canvas 2D context.- Type
- CanvasRenderingContext2D
-
getDOMElement()
-
- Source:
-
getHalfHeight()
-
- Source:
-
getHalfWidth()
-
- Source:
-
getHeight()
-
- Source:
-
getWidth()
-
- Source:
-
renderAABB()
-
- Source:
-
renderCircle()
-
- Source:
-
renderImage()
-
- Source:
-
renderLineSegment()
-
- Source:
-
renderNetworkObject2D()
-
- Source:
-
renderObject2D()
-
- Source:
-
renderParticle()
-
- Source:
-
renderPoint()
-
- Source:
-
renderPolygon()
-
- Source:
-
renderText()
-
- Source:
-
renderTexture()
-
- Source:
-
setFillColor()
-
- Source:
-
setHeight()
-
- Source:
-
setStrokeColor()
-
- Source:
-
setTextFont()
-
- Source:
-
setWidth()
-
- Source:
-
start()
-
- Source: