ProtectedactiveProtectedactiveProtectedactiveProtectedcurrentProtectedglobalProtectedgraphicalProtectedleadProtectedmeasureProtectedmeasureProtectedmusicProtectednumberProtectedrulesProtectedvisibleProtectedadaptIf a line repetition is ending and a new line repetition is starting at the end of the system, the double repetition line has to be split into two: one at the currently ending system and one at the next system. (this should be refactored at some point to not use a combined end/start line but always separated lines)
ProtectedaddCalculate the width needed for Instructions (Key, Clef, Rhythm, Repetition) for the measure.
ProtectedaddCalculates the width needed for Instructions (Clef, Repetition) for the measure.
ProtectedaddProtectedAddProtectedaddProtectedaddProtectedaddCalculate the [StaffLine] needed for a [[MusicSystem]].
ProtectedaddAdd all current vertical Measures to currentSystem.
ProtectedaddProtectedcalculateCalculates the relative Positions of all MusicSystems.
calculates the y positions of the staff lines within a system and furthermore the y positions of the systems themselves.
ProtectedcalculateCalculate the X ScalingFactor in order to strech the whole System.
ProtectedcheckCheck if an extra Instruction [[Measure]] is needed: courtesy key or rhythm instructions at the end of the system for a change at the start of the next system. If so, every staff of the system gets one, so that all staves end at the same x, and the courtesy time signatures align.
the measures that start the next system
ProtectedcreateCreate a new [[GraphicalMusicPage]] (for now only one long page is used per music sheet, as we scroll down and have no page flips)
ProtecteddecreaseIf the last [[MusicSystem]] doesn't need stretching, then this method decreases the System's Width, the [[StaffLine]]'s Width and the 5 [[StaffLine]]s length.
ProtectedfinalizeWhen the actual source measure doesn't fit any more, this method finalizes the current system and opens up a new empty system, where the actual measure will be added in the next iteration (if a measure is left, see hasMeasuresLeft()).
ProtectedfinalizeProtectedfitReplaces the current system's labels when they leave its measures too little room (EngravingRules.FitPartLabelsToMeasures), e.g. in a narrow container, where the part names pushed the first measure past the staff end: the first system then shows the part names on two lines, else the part abbreviations, else no labels, and later systems no abbreviations. Labels leave too little room when the notes get less than their minimum width and less than 3/4 of the room they would have without labels. So labels may take up to a quarter of the room of a measure wider than the system anyway, e.g. a dense measure alone in a system.
the width of the measures that isn't stretched: clefs, key and time signatures, barlines
the minimum width of the measures' notes, which is stretched to fill the system
ProtectedgetReturns the instructions drawn at the end of the measure in the staff (a clef change for the next measure), if any. A multiple rest measure has those of the last of its measures that has some, usually the clef change after it.
ProtectedgetGet the width the system should have for a given page width.
ProtectedgetReturns the last measure of the multiple rest measure that the given measure begins, which has its barline, or the given measure if it doesn't begin one.
ProtectedgetReturn the width of the corresponding [[SystemLine]] and sets the corresponding [[SystemLineEnum]].
ProtectedgetProtectedgetReturn the width of the corresponding [[SystemLine]] and set the corresponding [[SystemLineEnum]].
ProtectedgetProtectedhasWhether the measureList has a measure left to add to a system, at the measureListIndex or after it. The later measures of a multiple rest measure have no graphical measures there (see getLastMeasureOfMultiRest()), so none is left after a multiple rest measure that ends the measureList (the piece, or e.g. a batch of renderNext()), though the measureListIndex is within the measureList.
ProtectedinitializeInitialize the active Instructions from the first [[SourceMeasure]] of first [[SourceMusicPart]]. Also tracks instruction changes through measures before the first visible measure (for drawFromMeasureNumber).
ProtectedinitInitialize a new [[MusicSystem]].
ProtectedlayoutProtectednextCheck if a [[Repetition]] starts at the next [[Measure]].
ProtectednextCheck if a [[Repetition]] starts at the next [[Measure]].
ProtectednextCheck if the next [[Measure]] has a [[KeyInstruction]] change.
ProtectedoptimizeThis method checks the distances between any two consecutive StaffLines of a System and if needed, shifts the lower one down.
The top border of a page's first system (from its skyline), by which all systems of the page are moved down after the page layout, see MusicSheetCalculator.calculateMusicSystems(). The page layout includes this move when checking whether a system still fits above the bottom margin. Rounded to whole pixels to keep the staff line positions snapped by snapSystemYToCrispStaffLines(), or to the half-pixel grid if not snapping.
ProtectedpreviousProtectedsetSet the Width of the staff-Measures of one source measure.
ProtectedsnapSnaps a system's y position (in units) so that its staff lines render as crisp single pixel rows: the lines are 1px wide (at zoom 1), so their centers need to lie at half-pixel positions (a line centered between two pixel rows is anti-aliased over both at half opacity instead). The stafflines within the system share the same sub-pixel phase (see optimizeDistanceBetweenStaffLines), so snapping the system y aligns all of them. Shifts the system by at most half a pixel. No-op if EngravingRules.SnapStafflinesToCrispPixels is off.
ProtectedstretchStretch the whole System so that no white space is left at the end.
ProtectedthisCheck if at this [[Measure]] starts a [[Repetition]].
ProtectedthisCheck if this [[Measure]] is a [[Repetition]] ending.
ProtectedthisCheck if this [[Measure]] is a [[Repetition]] ending.
ProtectedtransposeProtectedupdateTrack down and update the active ClefInstruction in Measure's StaffEntries. This has to be done after the measure is added to a system (otherwise already the check if the measure fits to the system would update the active clefs..)
ProtectedupdateThis method updates the System's StaffLine's RelativePosition (starting from the given index).
Does the mapping from the currently visible staves to the global staff-list of the music sheet.