Cannon.Context
y-lohse edited this page Dec 28, 2012
·
4 revisions
When drawing to a canvas, many things are related to a CanvasRenderingContext. The Cannon.Context provides an abstract rendering context that you can use to draw things that are not directly related to a certain canvas (eg. gradients).
The properties of the Cannon.Context object provide constants for different drawing options, all related to CanvasRenderingContext objects.
Returns an instance of a CanvasRenderingContext. It's not directly related to a canvas, so feel free to do whatever you want with it.
- BUTT
- ROUND
- SQUARE
- ROUND
- BEVEL
- MITTER
- START
- END
- LEFT
- RIGHT
- CENTER
- IDEOGRAPHIC
- BOTTOM
- TOP
- HANGING
- MIDDLE
- ALPHABETIC
- IDEOGRAPHIC
- BOTTOM
- FILL
- STROKE
- SourceOver
- SourceIn
- SourceOut
- SourceAtop
- DestinationOver
- DestinationIn
- DestinationOut
- DestinationAtop
- Lighter
- Copy
- Xor
- Repeat
- RepeatX
- RepeatY
- NoRepeat