diff --git a/docs/api/assets/highlight.css b/docs/api/assets/highlight.css index 0c146d0e13..db063855a8 100644 --- a/docs/api/assets/highlight.css +++ b/docs/api/assets/highlight.css @@ -11,18 +11,18 @@ --dark-hl-4: #CE9178; --light-hl-5: #008000; --dark-hl-5: #6A9955; - --light-hl-6: #000000; - --dark-hl-6: #D4D4D4; - --light-hl-7: #A31515; - --dark-hl-7: #CE9178; - --light-hl-8: #0000FF; - --dark-hl-8: #569CD6; - --light-hl-9: #0070C1; - --dark-hl-9: #4FC1FF; - --light-hl-10: #001080; - --dark-hl-10: #9CDCFE; - --light-hl-11: #795E26; - --dark-hl-11: #DCDCAA; + --light-hl-6: #795E26; + --dark-hl-6: #DCDCAA; + --light-hl-7: #000000; + --dark-hl-7: #D4D4D4; + --light-hl-8: #A31515; + --dark-hl-8: #CE9178; + --light-hl-9: #0000FF; + --dark-hl-9: #569CD6; + --light-hl-10: #0070C1; + --dark-hl-10: #4FC1FF; + --light-hl-11: #001080; + --dark-hl-11: #9CDCFE; --light-hl-12: #098658; --dark-hl-12: #B5CEA8; --light-hl-13: #267F99; diff --git a/docs/api/classes/Accidental.html b/docs/api/classes/Accidental.html index 11e4cfd721..488b4b9eb8 100644 --- a/docs/api/classes/Accidental.html +++ b/docs/api/classes/Accidental.html @@ -847,14 +847,14 @@
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
┌───┬──┬──┐ ┌──┬──┬──┐
│ ├─ │ ─┤ vs │ ─┤ │ ─┤
│ │ │ │ │ │ │ │
+ ┌───┬──┬──┐ ┌──┬──┬──┐
│ ├─ │ ─┤ vs │ ─┤ │ ─┤
│ │ │ │ │ │ │ │
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Static
A helper function to autimatically build beams for a voice with configuration options.
Example configuration object:
-config = {
groups: [new Vex.Flow.Fraction(2, 8)],
stem_direction: -1,
beam_rests: true,
beam_middle_only: true,
show_stemlets: false
};
+config = {
groups: [new Vex.Flow.Fraction(2, 8)],
stem_direction: -1,
beam_rests: true,
beam_middle_only: true,
show_stemlets: false
};
Example of a phrase:
- [{
type: UP,
text: "whole"
width: 8;
},
{
type: DOWN,
text: "whole"
width: 8;
},
{
type: UP,
text: "half"
width: 8;
},
{
type: UP,
text: "whole"
width: 8;
},
{
type: DOWN,
text: "1 1/2"
width: 8;
}]
+ [{
type: UP,
text: "whole"
width: 8;
},
{
type: DOWN,
text: "whole"
width: 8;
},
{
type: UP,
text: "half"
width: 8;
},
{
type: UP,
text: "whole"
width: 8;
},
{
type: DOWN,
text: "1 1/2"
width: 8;
}]
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Creates EasyScore. Normally the first step after constructing a Factory. For example:
-const vf: Factory = new Vex.Flow.Factory({renderer: { elementId: 'boo', width: 1200, height: 600 }});
const score: EasyScore = vf.EasyScore();
+const vf: Factory = new Vex.Flow.Factory({renderer: { elementId: 'boo', width: 1200, height: 600 }});
const score: EasyScore = vf.EasyScore();
Static
Examples:
-Vex.Flow.setMusicFont('Petaluma');
Vex.Flow.setMusicFont('Bravura', 'Gonville');
+Vex.Flow.setMusicFont('Petaluma');
Vex.Flow.setMusicFont('Bravura', 'Gonville');
CASE 1: You are using vexflow.js
, which includes all music fonts (Bravura, Gonville, Petaluma, Custom).
In this case, calling this method is optional, since VexFlow already defaults to a music font stack of:
@@ -762,7 +762,7 @@
Static
CASE 3: You are using the light weight vexflow-core.js
to take advantage of lazy loading for fonts.
In this case, the default music font stack is empty.
Example:
-await Vex.Flow.fetchMusicFont('Petaluma');
Vex.Flow.setMusicFont('Petaluma');
... (do VexFlow stuff) ...
+await Vex.Flow.fetchMusicFont('Petaluma');
Vex.Flow.setMusicFont('Petaluma');
... (do VexFlow stuff) ...
See demos/fonts/
for more examples.
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
Set the element style used to render.
Example:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.draw();
Note: If the element draws additional sub-elements (ie.: Modifiers in a Stave),
the style can be applied to all of them by means of the context:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.getContext().setFillStyle('red');
element.getContext().setStrokeStyle('red');
element.draw();
or using drawWithStyle:
-element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
+element.setStyle({ fillStyle: 'red', strokeStyle: 'red' });
element.drawWithStyle();
The URL above includes a version number vexflow@x.y.z
. Specifying a particular version is good practice, to prevent rare issues with a future update breaking your deployment. During development & testing, feel free to use the latest release by omitting the version number: https://cdn.jsdelivr.net/npm/vexflow/build/cjs/vexflow.js
If your project uses a bundler, you can install VexFlow from npm:
-npm install vexflow
+npm install vexflow
Read our detailed guide on integrating with VexFlow.
EasyScore
EasyScore is VexFlow's high-level API for creating music notation. On a web page containing a <div id="output"></div>
, the following code displays a score:
-const { Factory, EasyScore, System } = Vex.Flow;
const vf = new Factory({
renderer: { elementId: 'output', width: 500, height: 200 },
});
const score = vf.EasyScore();
const system = vf.System();
system
.addStave({
voices: [
score.voice(score.notes('C#5/q, B4, A4, G#4', { stem: 'up' })),
score.voice(score.notes('C#4/h, C#4', { stem: 'down' })),
],
})
.addClef('treble')
.addTimeSignature('4/4');
vf.draw();
+const { Factory, EasyScore, System } = Vex.Flow;
const vf = new Factory({
renderer: { elementId: 'output', width: 500, height: 200 },
});
const score = vf.EasyScore();
const system = vf.System();
system
.addStave({
voices: [
score.voice(score.notes('C#5/q, B4, A4, G#4', { stem: 'up' })),
score.voice(score.notes('C#4/h, C#4', { stem: 'down' })),
],
})
.addClef('treble')
.addTimeSignature('4/4');
vf.draw();
See a running example of EasyScore here.
Learn more about EasyScore here.
Native API
If you need more control, you can use the low-level VexFlow API. Below, we render a stave using SVG. See a running example of the low-level API here.
-const { Renderer, Stave } = Vex.Flow;
// Create an SVG renderer and attach it to the DIV element with id="output".
const div = document.getElementById('output');
const renderer = new Renderer(div, Renderer.Backends.SVG);
// Configure the rendering context.
renderer.resize(500, 500);
const context = renderer.getContext();
context.setFont('Arial', 10);
// Create a stave of width 400 at position 10, 40.
const stave = new Stave(10, 40, 400);
// Add a clef and time signature.
stave.addClef('treble').addTimeSignature('4/4');
// Connect it to the rendering context and draw!
stave.setContext(context).draw();
+const { Renderer, Stave } = Vex.Flow;
// Create an SVG renderer and attach it to the DIV element with id="output".
const div = document.getElementById('output');
const renderer = new Renderer(div, Renderer.Backends.SVG);
// Configure the rendering context.
renderer.resize(500, 500);
const context = renderer.getContext();
context.setFont('Arial', 10);
// Create a stave of width 400 at position 10, 40.
const stave = new Stave(10, 40, 400);
// Add a clef and time signature.
stave.addClef('treble').addTimeSignature('4/4');
// Connect it to the rendering context and draw!
stave.setContext(context).draw();
Examples
Take a look at the VexFlow tutorial.
Set the element style used to render.
Example:
-