This glyph acts as container for handling multiple voice rendering
Inheritance: GlyphGroup, ISupportsFinalize
Exemplo n.º 1
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(0, 0)
 {
     Beat           = beat;
     Ties           = new FastList <Glyph>();
     VoiceContainer = voiceContainer;
 }
Exemplo n.º 2
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false)
     : base(0, 0)
 {
     Beat             = beat;
     Ties             = new FastList <Glyph>();
     VoiceContainer   = voiceContainer;
     UseLayoutingInfo = useLayoutingInfo;
 }
Exemplo n.º 3
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false)
     : base(0, 0)
 {
     Beat = beat;
     Ties = new FastList<Glyph>();
     VoiceContainer = voiceContainer;
     UseLayoutingInfo = useLayoutingInfo;
 }
Exemplo n.º 4
0
 private void UpdateWidth()
 {
     Width = PostBeatGlyphsStart;
     if (_postBeatGlyphs.Count > 0)
     {
         Width += _postBeatGlyphs[_postBeatGlyphs.Count - 1].X + _postBeatGlyphs[_postBeatGlyphs.Count - 1].Width;
     }
     Std.Foreach(_voiceContainers.Values, c =>
     {
         if (_biggestVoiceContainer == null || c.Width > _biggestVoiceContainer.Width)
         {
             _biggestVoiceContainer = c;
         }
     });
 }
Exemplo n.º 5
0
 private VoiceContainerGlyph GetOrCreateVoiceContainer(int voiceIndex)
 {
     VoiceContainerGlyph c;
     if (voiceIndex >= _voiceContainers.Count)
     {
         c = new VoiceContainerGlyph(0, 0, voiceIndex);
         c.Renderer = this;
         _voiceContainers[voiceIndex] = c;
     }
     else
     {
         c = _voiceContainers[voiceIndex];
     }
     return c;
 }
Exemplo n.º 6
0
 public ScoreBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(beat, voiceContainer)
 {
 }
Exemplo n.º 7
0
        public virtual void DoLayout()
        {
            Helpers = Staff.StaveGroup.Helpers.Helpers[Bar.Staff.Track.Index][Bar.Staff.Index][Bar.Index];

            for (int i = 0; i < Bar.Voices.Count; i++)
            {
                var voice = Bar.Voices[i];
                var c = new VoiceContainerGlyph(0, 0, voice);
                c.Renderer = this;
                _voiceContainers[Bar.Voices[i].Index] = c;
            }

            CreatePreBeatGlyphs();
            CreateBeatGlyphs();
            CreatePostBeatGlyphs();

            var postBeatStart = 0f;
            foreach (var voice in _voiceContainers)
            {
                var c = _voiceContainers[voice];
                c.X = BeatGlyphsStart;
                c.DoLayout();
                var x = c.X + c.Width;
                if (postBeatStart < x)
                {
                    postBeatStart = x;
                }
            }

            _postBeatGlyphs.X = postBeatStart;

            Width = _postBeatGlyphs.X + _postBeatGlyphs.Width;
        }
Exemplo n.º 8
0
 public TabBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(beat, voiceContainer)
 {
 }