Create a new object of the calculator
staffline where the calculator should be attached
Get the plain bottomline array
Sampling units that are used to quantize the sky and bottom line
Get the plain skyline array
Parent staffline where the skybottomline calculator is attached to
Replay the geometric skyline calc's per-measure side effects WITHOUT the expensive extent measurement, so lazy rendering can reuse cached sky/bottom lines while leaving the measures in the exact state a normal render would. (calculateLinesGeometric extends the beamed stems and does correctNotePositions inside measure.draw; here we do both directly since the draw is skipped, see VexFlowMeasure.applyDrawSideEffects().) No-op for the non-default raster skyline path. lastMeasureFormats: see calculateLines().
OptionallastMeasureFormats: Map<SourceMeasure, IVerticalMeasureFormat>This method calculates the Sky- and BottomLines for a StaffLine.
OptionallastMeasureFormats: Map<SourceMeasure, IVerticalMeasureFormat>
For the geometric calculation of several stafflines: the last format of each vertical measure in it, so that the stafflines of a vertical measure don't repeat its format (see VexFlowMeasure.format()).
This method finds the maximum value of the BottomLine, ignoring NaN values (a loop, see getSkyLineMin()).
the maximum
Returns the BottomLine's maximum for a label's box, e.g. a dynamic's, from its left to its right margin (relative to the staffline): in every sample the box touches. See getSkyLineMinForLabel().
Left margin of the box
Right margin of the box
Returns the BottomLine's maximum under a bounding box: in the samples from its left to its right border, rounded outward to whole units, and in the sample after them, like getBottomLineMaxInRange(). Only the box's x range counts, not how far up or down it reaches. The box's AbsolutePosition has to be relative to the staffline, as while the lines are calculated (calculateLines() calls calculateAbsolutePositionsRecursive(0, 0) on each measure's PositionAndShape).
Bounding box under which the maximum is read
the BottomLine's maximum in that range
This method finds the BottomLine's maximum value within a given range: in the samples the range touches and also in the sample after them, see getSkyLineMinInRange(). For the samples a box touches only, see getBottomLineMaxForLabel().
Start of the range, in units relative to the staffline
End of the range (the sample after it is read too)
This method finds the minimum value of the SkyLine, ignoring NaN values. A loop of Math.min(min, value) gives the same result as Math.min(...this.SkyLine.filter(s => !isNaN(s))) (including -0 before 0, and Infinity for no values), without copying the line and spreading it into the arguments of a call, which is slow for lines of thousands of values and fails for very long ones.
the minimum
Returns the SkyLine's minimum for a label's box, e.g. a dynamic's, from its left to its right margin (relative to the staffline): in every sample the box touches. Unlike getSkyLineMinInRange(), not also in the sample after the box. See updateSkyLineWithLabel().
Left margin of the box
Right margin of the box
This method finds the SkyLine's minimum value within a given range: in the samples the range touches (rounded outward, a sample is 1 / SamplingUnit wide) and also in the sample after them. Callers rely on that extra sample, e.g. a measure number at a system start (the top of the clef is under the end of the number, see MusicSheetCalculator.calculateSingleMeasureNumberPlacement()) and a fingering above (the stem at the right of the note head). For the samples a box touches only, see getSkyLineMinForLabel().
Start of the range, in units relative to the staffline
End of the range (the sample after it is read too)
This method merges a line (e.g. the bottom edge of a tremolo stroke between two notes) into the BottomLine, updating the BottomLine only where the line lies below it (preserving more extreme existing values), unlike updateBottomLineWithWedge, which overwrites the existing values.
This method merges a line (e.g. the top edge of a tremolo stroke between two notes) into the SkyLine, updating the SkyLine only where the line lies above it (preserving more extreme existing values), unlike updateSkyLineWithWedge, which overwrites the existing values.
Sets every sample of the bottom line to the value
value to be set
Replace the sky- and bottom-line arrays directly (lazy rendering reuses the previously-computed lines of stable interior systems instead of re-measuring them; see VexFlowMusicSheetCalculator.calculateSkyBottomLines).
Sets every sample of the sky line to the value
value to be set
This method updates the BottomLine for a given range with a given value
Start index of the range
End index of the range (excluding)
??
Updates the BottomLine with a label's box, e.g. a dynamic's, from its left to its right margin (relative to the staffline): only in the samples the box covers completely. See updateSkyLineWithLabel().
Left margin of the box
Right margin of the box
Bottom margin of the box
This method updates the skylines and bottomlines for mStaffLineParent.
the skylines and bottomlines of mStaffLineParent's measures calculated by SkyBottomLineBatchCalculator
This method updates the SkyLine for a given range with a given value //param to update the SkyLine for
Start index of the range
End index of the range
??
Updates the SkyLine with a label's box, e.g. a dynamic's, from its left to its right margin (relative to the staffline): only in the samples the box covers completely. A label placed later reads every sample its box touches (getSkyLineMinForLabel()), so labels whose boxes don't overlap don't read each other. With updateSkyLineInRange() and getSkyLineMinInRange(), which round outward to the samples (1 / SamplingUnit wide), a label next to another one, e.g. a p right after "dim.", was placed further from the staff than it when both touched the same sample. The margins keep a label clear of what is in a sample it covers only partially.
Left margin of the box
Right margin of the box
Top margin of the box
This method updates the StaffLine Borders with the Sky- and BottomLines Min- and MaxValues.
This class calculates and holds the skyline and bottom line information. It also has functions to update areas of the two lines if new elements are added to the staffline (e.g. measure number, annotations, ...)