Exemple #1
0
 private float BeamEndMsPosition(Beam beam)
 {
     Debug.Assert(this.Beams.Contains(beam));
     float beamEndMsPosition = float.MinValue;
     for(int i = Chords.Count - 1; i >= 0; --i)
     {
         ChordSymbol chord = Chords[i];
         float stemX = chord.ChordMetrics.StemMetrics.OriginX;
         if(stemX == beam.LeftX || stemX == beam.RightX) // rightX can be a beam stub
         {
             beamEndMsPosition = chord.MsPosition;
             break;
         }
     }
     Debug.Assert(beamEndMsPosition != float.MinValue);
     return beamEndMsPosition;
 }
Exemple #2
0
 private float BeamBeginMsPosition(Beam beam)
 {
     Debug.Assert(this.Beams.Contains(beam));
     float beamBeginMsPosition = float.MinValue;
     foreach(ChordSymbol chord in Chords)
     {
         float stemX = chord.ChordMetrics.StemMetrics.OriginX;
         if(stemX == beam.LeftX || stemX == beam.RightX) // rightX can be a beam stub
         {
             beamBeginMsPosition = chord.MsPosition;
             break;
         }
     }
     Debug.Assert(beamBeginMsPosition != float.MinValue);
     return beamBeginMsPosition;
 }