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 does correctNotePositions inside measure.draw; here we call it directly since the draw is skipped.) 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
This method returns the maximum value of the bottom line around a specific bounding box. Will return undefined if the bounding box is not valid or inside staffline
Bounding box where the maximum should be retrieved from
Maximum value inside bounding box boundaries or undefined if not possible
This method finds the BottomLine's maximum value within a given range.
Start index of the range
End index of the range (excluding)
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.
Starting index
End index (including)
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.
Resets a bottom line in a range to its original value
Start index of the range
End index of the range
Resets a SkyLine in a range to its original value
Start index of the range
End index of the range (excluding)
Update the whole bottomline with a certain 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).
Update the whole skyline with a certain 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.
Updates sky- and bottom line with a boundingBox and its children
Bounding box to be added
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, ...)