ProtectedcanvasProtectedinnerProtectedrendererProtectedrules(Try to) free memory. Currently only relevant on iOS.
The general type of backend: Canvas or SVG. This is not used for now (only VexflowBackendType used), but it may be useful when we don't want to use a Vexflow class.
Initialize a canvas without attaching it to a DOM node. Can be used to draw in background
Width of the canvas
Height of the canvas
Optionalid: stringOptionalcolor: stringRenders a rectangle with the given style to the screen. It is given in screen coordinates.
the rect in screen coordinates
the style id
alpha value between 0 and 1
Renders a text to the screen.
the language of the text as a BCP 47 tag (e.g. "ja"), for the browser's choice of fonts (see Label.language)
Resizes the canvas, keeping what is drawn on it. Resizing a canvas clears its bitmap, and incremental rendering (renderNext) grows the canvas as it appends batches: downwards on the endless page, to the right with RenderSingleHorizontalStaffline. So snapshot the current pixels, redraw them after resizing, and fill the rest of the canvas with the page background (if set). For a normal render the canvas is still empty here, and clear() fills it afterwards, so this is effectively a no-op.
the new width in pixels
the new height in pixels
The GraphicalMusicPage the backend is drawing from. Each backend only renders one GraphicalMusicPage, to which the coordinates are relative.