Creates a new CanvasRenderer
that renders to the given rendering context.
The viewport
is used to determine the translation/rotation/scaling of the content
to draw.
Protected
beginReturns true iff other can be rendered onto this without data loss.
Draws a styled path. If within an object started by startObject, the resultant path may not be visible until endObject is called.
Strokes a rectangle. Boundary lines have width [lineWidth] and are filled with [lineFill].
This is equivalent to drawPath(Path.fromRect(...).toRenderable(...))
.
Protected
endProtected
getProtected
getProtected
lineProtected
moveMUST throw if other and this are not of the same base class.
Set a transformation to apply to things before rendering, replacing the viewport's transform.
This should be called whenever a new object is being drawn.
The bounding box of the object to be drawn.
Optional
clip: booleanWhether content outside _boundingBox
should be drawn. Renderers
that override this method are not required to support _clip
.
Protected
traceProtected
trace
Renders onto a
CanvasRenderingContext2D
.Example