Beispiel #1
0
 public override void BuildBoundingsLookup(BoundingsLookup lookup)
 {
     for (int i = 0, j = _groups.Count; i < j; i++)
     {
         _groups[i].BuildBoundingsLookup(lookup);
     }
 }
 public override void BuildBoundingsLookup(BoundingsLookup lookup)
 {
     _group.BuildBoundingsLookup(lookup);
 }
Beispiel #3
0
        public void BuildBoundingsLookup(BoundingsLookup lookup)
        {
            var visualTop = Y + _firstStaveInAccolade.Y;
            var visualBottom = Y + _lastStaveInAccolade.Y + _lastStaveInAccolade.Height;
            var realTop = Y + _allStaves[0].Y;
            var realBottom = Y + _allStaves[_allStaves.Count - 1].Y + _allStaves[_allStaves.Count - 1].Height;

            var visualHeight = visualBottom - visualTop;
            var realHeight = realBottom - realTop;
            for (int i = 0, j = _firstStaveInAccolade.BarRenderers.Count; i < j; i++)
            {
                _firstStaveInAccolade.BarRenderers[i].BuildBoundingsLookup(lookup, visualTop, visualHeight, realTop, realHeight, X);
            }
        }
Beispiel #4
0
 public override void BuildBoundingsLookup(BoundingsLookup lookup,
         float visualTop, float visualHeight,
         float realTop, float realHeight, float x)
 {
     base.BuildBoundingsLookup(lookup, visualTop, visualHeight, realTop, realHeight, x);
     var barLookup = lookup.Bars[lookup.Bars.Count - 1];
     var beatStart = BeatGlyphsStart;
     Std.Foreach(_voiceContainers.Values, c =>
     {
         for (int i = 0, j = c.BeatGlyphs.Count; i < j; i++)
         {
             var bc = c.BeatGlyphs[i];
             var beatLookup = new BeatBoundings();
             beatLookup.Beat = bc.Beat;
             // on beat bounding rectangle
             beatLookup.VisualBounds = new Bounds(
             x + Stave.X + X + beatStart + c.X + bc.X + bc.OnNotes.X, visualTop,
             bc.OnNotes.Width, visualHeight);
             // real beat boundings
             beatLookup.Bounds = new Bounds(
             x + Stave.X + X + beatStart + c.X + bc.X, realTop,
             bc.Width, realHeight);
             barLookup.Beats.Add(beatLookup);
         }
     });
 }
Beispiel #5
0
 public abstract void BuildBoundingsLookup(BoundingsLookup lookup);
Beispiel #6
0
 public BoundingsLookup BuildBoundingsLookup()
 {
     var lookup = new BoundingsLookup();
     Layout.BuildBoundingsLookup(lookup);
     return lookup;
 }
Beispiel #7
0
 public virtual void BuildBoundingsLookup(BoundingsLookup lookup, float visualTop, float visualHeight, float realTop, float realHeight, float x)
 {
     var barLookup = new BarBoundings();
     barLookup.Bar = Bar;
     barLookup.IsFirstOfLine = IsFirstOfLine;
     barLookup.IsLastOfLine = IsLastOfLine;
     barLookup.VisualBounds = new Bounds(x + Stave.X + X, visualTop, Width, visualHeight);
     barLookup.Bounds = new Bounds(x + Stave.X + X, realTop, Width, realHeight);
     lookup.Bars.Add(barLookup);
 }