12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import {StaffMeasure} from "../StaffMeasure";
- import {SourceMeasure} from "../../VoiceData/SourceMeasure";
- import {Staff} from "../../VoiceData/Staff";
- import {BoundingBox} from "../BoundingBox";
- import {StaffLine} from "../StaffLine";
- import {SystemLinesEnum} from "../SystemLinesEnum";
- import {ClefInstruction} from "../../VoiceData/Instructions/ClefInstruction";
- import {KeyInstruction} from "../../VoiceData/Instructions/KeyInstruction";
- import {RhythmInstruction} from "../../VoiceData/Instructions/RhythmInstruction";
- export class VexFlowMeasure extends StaffMeasure {
- constructor(staff: Staff, staffLine: StaffLine = undefined, sourceMeasure: SourceMeasure = undefined) {
- super(staff, staffLine, sourceMeasure);
- // this.MinimumStaffEntriesWidth =
- }
- /**
- * Reset all the geometric values and parameters of this measure and put it in an initialized state.
- * This is needed to evaluate a measure a second time by system builder.
- */
- public resetLayout(): void {
- this.beginInstructionsWidth = 0;
- }
- /**
- * returns the x-width of a given measure line.
- * @param line
- * @returns {SystemLinesEnum} the x-width
- */
- public getLineWidth(line: SystemLinesEnum): number {
- //SystemLinesEnum.
- return 5;
- }
- /**
- * adds the given clef to the begin of the measure.
- * This has to update/increase BeginInstructionsWidth.
- * @param clef
- */
- public addClefAtBegin(clef: ClefInstruction): void {
- this.beginInstructionsWidth += 20;
- }
- /**
- * adds the given key to the begin of the measure.
- * This has to update/increase BeginInstructionsWidth.
- * @param currentKey the new valid key.
- * @param previousKey the old cancelled key. Needed to show which accidentals are not valid any more.
- * @param currentClef the valid clef. Needed to put the accidentals on the right y-positions.
- */
- public addKeyAtBegin(currentKey: KeyInstruction, previousKey: KeyInstruction, currentClef: ClefInstruction): void {
- }
- /**
- * adds the given rhythm to the begin of the measure.
- * This has to update/increase BeginInstructionsWidth.
- * @param rhythm
- */
- public addRhythmAtBegin(rhythm: RhythmInstruction): void {
- }
- /**
- * adds the given clef to the end of the measure.
- * This has to update/increase EndInstructionsWidth.
- * @param clef
- */
- public addClefAtEnd(clef: ClefInstruction): void {
- }
- /**
- * This method sets the x-position relative to the staffline. (y-Position is always 0 relative to the staffline)
- * @param xPos
- */
- public setPositionInStaffline(xPos: number): void {
- }
- /**
- * Sets the overall x-width of the measure.
- * @param width
- */
- public setWidth(width: number): void {
- }
- /**
- * This method is called after the StaffEntriesScaleFactor has been set.
- * Here the final x-positions of the staff entries have to be set.
- * (multiply the minimal positions with the scaling factor, considering the BeginInstructionsWidth)
- */
- public layoutSymbols(): void {
- }
- }
|