ProtectedgraphicalLazy horizontal rendering (RenderSingleHorizontalStaffline): draw only graphical objects whose right edge x (in OSMD units) lies in (LazyDrawFromXUnits, LazyDrawToXUnits] -- the measures and spanning elements that first entered the drawn frontier this batch. ±Infinity (default) draws everything. Set by drawPage() for each system from LazyDrawSystemWindows; reset after.
Lazy rendering: when >= 0, drawPage() draws only the systems whose index, counted through the systems of all pages, is within [LazyDrawSystemsFromIndex, LazyDrawSystemsToIndexExcl), leaving the already-drawn systems above untouched in the shared backends. -1 (default) draws every system. Set by OpenSheetMusicDisplay.renderAppend() before each appended batch; reset to -1 after.
Lazy horizontal rendering: when set, drawPage() draws only the systems in this map, each with its own draw x-window (see LazyDrawFromXUnits): a batch can reach several systems, e.g. after forced system breaks. Set by OpenSheetMusicDisplay.renderAppendGrowingHorizontal() per batch; reset after.
Lazy horizontal rendering: when true, drawLabel() ignores the x-window gate. Scoped (set/restored) to the page-label loop in drawPage(), since those labels span the full page width and must all be drawn even though their left edges lie behind the final batch's frontier, and to the labels of a measure's staff entries (see VexFlowMusicSheetDrawer.drawMeasure()), which are drawn with their measure.
Lazy horizontal rendering: when true, drawPage() skips the page-level labels (title/credits) and the bounding boxes (see drawableBoundingBoxElement). They are drawn once, on the final batch, when the page is drawn to its full width.
ProtectedrulesProtectedtextProtectedleadProtectedactivateProtectedapplyProtectedapplyConverts a rectangle from unit to pixel space.
ProtectedapplyConverts a distance from unit to pixel space.
the distance in units
the distance in pixels
ProtecteddrawProtecteddrawProtecteddrawDraws a continuous dynamic expression (wedges) to the canvas
ProtecteddrawDraw all dashes to the canvas
Array of lyric dashes to be drawn
ProtecteddrawProtecteddrawProtecteddrawProtecteddrawDraws an instantaneous dynamic expression (p, pp, f, ff, ...) to the canvas
GraphicalInstantaneousDynamicExpression to be drawn
ProtecteddrawProtecteddrawDraws a line in the current backend. Only usable while pages are drawn sequentially, because backend reference is updated in that process. To add your own lines after rendering, use DrawOverlayLine.
ProtecteddrawDraws the lyric lines (extenders, e.g. "dich___") of a staff line. They are positioned relative to the staff line (see MusicSheetCalculator.calculateLyricExtend()), because the staff lines are spaced vertically only after the lyrics are positioned. They are drawn at their absolute position without changing them, so that drawing the laid-out sheet again (e.g. in an incremental render) draws them at the same position.
the lyric lines of the staff line
the staff line the lyric lines are positioned relative to
ProtecteddrawProtecteddrawProtecteddrawProtecteddrawLets a user/developer draw an overlay line on the score. Use this instead of drawLine, which is for OSMD internally only. The MusicPage has to be specified, because each page and Vexflow backend has its own relative coordinates. (the AbsolutePosition of a GraphicalNote is relative to its backend) To get a MusicPage, use GraphicalNote.ParentMusicPage.
Optionalid: stringProtecteddrawOptionalid: stringOptionalcolor: stringProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawProtecteddrawDraws the strokes ("tremolo beams") of tremolos between two notes in this measure, e.g. two alternating half notes with 3 strokes between them, often seen in orchestral string parts. (Vexflow doesn't support these tremolos, so we draw them ourselves here.) Also updates the SkyLine/BottomLine where the strokes exceed it.
ProtecteddrawProtectedgetProtectedgetProtectedisProtectedlazyLazy horizontal rendering: whether an object with this bounding box falls in the current draw x-window (its right edge first entered the drawn frontier this batch). True when not lazy-horizontal.
ProtectedlazyLazy horizontal rendering: whether to draw the once-only system elements (instrument braces and group brackets at the left edge, and the sky and bottom lines of the stafflines, see skyLineVisible). True for non-lazy and for a system's first lazy-horizontal batch, which owns its left edge (LazyDrawFromXUnits is -Infinity); false for continuation batches, so a system's brace isn't redrawn on top of itself every batch. (Vertical lazy keeps the x-window at ±Infinity and draws each system's brace once via the per-system gate, so this stays true there.)
ProtectedlazyProtectedlazyLazy rendering: whether drawPage() draws the system with the given index (see LazyDrawSystemsFromIndex).
the index of the system, counted through the systems of all pages
true if the system is in the draw range of the batch, or if the render isn't lazy
ProtectedrenderRenders a Label to the screen (e.g. Title, composer..)
holds the label string, the text height in units and the font parameters
is the current rendering layer. There are many layers on top of each other to which can be rendered. Not needed for now.
Not needed for now.
Not needed for now.
the position of the lower left corner of the text in screen coordinates
ProtectedrenderRenders a rectangle with the given style to the screen. It is given in screen coordinates.
the rect in screen coordinates
is the current rendering layer. There are many layers on top of each other to which can be rendered. Not needed for now.
the style id
alpha value between 0 and 1
Protectedrender
Draw a [[GraphicalMusicSheet]] (through the .drawSheet method)
The drawing is implemented with a top-down approach, starting from a music sheet, going through pages, systems, staffs... ... and ending in notes, beams, accidentals and other symbols. It's worth to say, that this class just draws the symbols and graphical elements, using the positions that have been computed before. But in any case, some of these previous positioning algorithms need the sizes of the concrete symbols (NoteHeads, sharps, flats, keys...). Therefore, there are some static functions on the 'Bounding Boxes' section used to compute these symbol boxes at the beginning for the later use in positioning algorithms.
This class also includes the resizing and positioning of the symbols due to user interaction like zooming or panning.