-
-
Notifications
You must be signed in to change notification settings - Fork 287
/
VexFlowInstantaneousDynamicExpression.ts
31 lines (26 loc) · 1.51 KB
/
VexFlowInstantaneousDynamicExpression.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { GraphicalInstantaneousDynamicExpression } from "../GraphicalInstantaneousDynamicExpression";
import { InstantaneousDynamicExpression, DynamicEnum } from "../../VoiceData/Expressions/InstantaneousDynamicExpression";
import { GraphicalLabel } from "../GraphicalLabel";
import { Label } from "../../Label";
import { TextAlignmentEnum } from "../../../Common/Enums/TextAlignment";
import { FontStyles } from "../../../Common/Enums/FontStyles";
import { StaffLine } from "../StaffLine";
import { GraphicalMeasure } from "../GraphicalMeasure";
export class VexFlowInstantaneousDynamicExpression extends GraphicalInstantaneousDynamicExpression {
constructor(instantaneousDynamicExpression: InstantaneousDynamicExpression, staffLine: StaffLine, measure: GraphicalMeasure) {
super(instantaneousDynamicExpression, staffLine, measure);
this.label = new GraphicalLabel(new Label(this.Expression),
this.rules.ContinuousDynamicTextHeight,
TextAlignmentEnum.CenterCenter,
this.PositionAndShape);
this.label.Label.fontStyle = FontStyles.BoldItalic;
this.label.setLabelPositionAndShapeBorders();
this.PositionAndShape.calculateBoundingBox();
}
get InstantaneousDynamic(): InstantaneousDynamicExpression {
return this.mInstantaneousDynamicExpression;
}
get Expression(): string {
return DynamicEnum[this.mInstantaneousDynamicExpression.DynEnum];
}
}