Creates a renderer that renders onto elem
. If sanitize
, don't render potentially untrusted data.
viewport
is used to determine the translation/rotation/scaling/output size of the rendered
data.
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.
Draw a representation of [points]. Intended for debugging.
Rest
...points: Vec3[]Strokes a rectangle. Boundary lines have width [lineWidth] and are filled with [lineFill].
This is equivalent to drawPath(Path.fromRect(...).toRenderable(...))
.
Notes the end of an object.
Optional
loaderData: LoadSaveDataTableOptional
elemClassNames: string[]Protected
endProtected
getProtected
getReturns true iff the given rectangle is so small, rendering anything within it has no effect on the image.
Protected
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.
Protected
traceProtected
traceStatic
fromCreates a new SVG element and SVGRenerer
with width
, height
, viewBox
,
and other metadata attributes set for the given Viewport
.
If options
is a boolean
, it is interpreted as whether to sanitize (not add unknown
SVG entities to) the output.
Renders onto an
SVGElement
.See
Editor.toSVG