new Renderer(s, div, where)
Renderer is a function that takes a stream, an
optional existing canvas or SVG element and a DOM
element where the canvas or SVG element should be placed
and renders the stream as Vexflow on the
canvas or svg element, placing it then in the where
DOM.
"s" can be any type of Stream.
"div" and "where" can be either a DOM
element or a jQuery object.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
s |
music21.stream.Stream | main stream to render |
||
div |
div |
<optional> |
existing canvas or div-surroundingSVG element |
|
where |
Node | jQuery |
<optional> |
document.body | where to render the stream |
- Source:
Properties:
Name | Type | Description |
---|---|---|
vfRenderer |
Vex.Flow.Renderer | a Vex.Flow.Renderer to use |
rendererType |
string | canvas or svg |
ctx |
Vex.Flow.Context | a Vex.Flow.Context (Canvas or SVG) to use. |
div |
div | div-with-svg-or-canvas element |
$div |
jQuery | jQuery div or canvas element |
$where |
jQuery | jQuery element to render onto |
activeFormatter |
Vex.Flow.Formatter | formatter |
beamGroups |
Array.<Vex.Flow.Beam> | beamGroups |
vfTies |
Array.<Vex.Flow.StaveTie> | ties as instances of Vex.Flow.StaveTie |
systemBreakOffsets |
Array.<number> | where to break the systems |
vfTuplets |
Array.<Vex.Flow.Tuplet> | tuplets represented in Vexflow |
stacks |
Array.<music21.vfShow.RenderStack> | array of RenderStack objects |