import { GraphicalObject } from "./GraphicalObject" ; import { OctaveShift , OctaveEnum } from "../VoiceData/Expressions/ContinuousExpressions/OctaveShift" ; import { BoundingBox } from "./BoundingBox" ; import { MusicSymbol } from "./MusicSymbol" ; import { ArgumentOutOfRangeException } from "../Exceptions" ; import { PointF2D } from "../../Common/DataObjects/PointF2D" ; /**
 * The graphical counterpart of an [[OctaveShift]]
 */ export class GraphicalOctaveShift extends GraphicalObject { constructor ( octaveShift , parent ) { super ( ) ; this . getOctaveShift = octaveShift ; this . setSymbol ( ) ; this . PositionAndShape = new BoundingBox ( this , parent ) ; } public getOctaveShift : OctaveShift ; public octaveSymbol : MusicSymbol ; public dashesStart : PointF2D ; public dashesEnd : PointF2D ; public endsOnDifferentStaffLine : boolean ; public isFirstPart : boolean ; public isSecondPart : boolean ; private setSymbol ( ) { switch ( this . getOctaveShift . Type ) { case OctaveEnum . VA8 : this . octaveSymbol = MusicSymbol . VA8 ; break ; case OctaveEnum . VB8 : this . octaveSymbol = MusicSymbol . VB8 ; break ; case OctaveEnum . MA15 : this . octaveSymbol = MusicSymbol . MA15 ; break ; case OctaveEnum . MB15 : this . octaveSymbol = MusicSymbol . MB15 ; break ; default : throw new ArgumentOutOfRangeException ( "" ) ; } } }