This glyph acts as container for handling multiple voice rendering
Inheritance: GlyphGroup, ISupportsFinalize
コード例 #1
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(0, 0)
 {
     Beat           = beat;
     Ties           = new FastList <Glyph>();
     VoiceContainer = voiceContainer;
 }
コード例 #2
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false)
     : base(0, 0)
 {
     Beat             = beat;
     Ties             = new FastList <Glyph>();
     VoiceContainer   = voiceContainer;
     UseLayoutingInfo = useLayoutingInfo;
 }
コード例 #3
0
 public BeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer, bool useLayoutingInfo = false)
     : base(0, 0)
 {
     Beat = beat;
     Ties = new FastList<Glyph>();
     VoiceContainer = voiceContainer;
     UseLayoutingInfo = useLayoutingInfo;
 }
コード例 #4
0
ファイル: GroupedBarRenderer.cs プロジェクト: eriser/alphaTab
 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;
         }
     });
 }
コード例 #5
0
ファイル: GroupedBarRenderer.cs プロジェクト: eriser/alphaTab
 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;
 }
コード例 #6
0
 public ScoreBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(beat, voiceContainer)
 {
 }
コード例 #7
0
ファイル: BarRendererBase.cs プロジェクト: CoderLine/alphaTab
        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;
        }
コード例 #8
0
 public TabBeatContainerGlyph(Beat beat, VoiceContainerGlyph voiceContainer)
     : base(beat, voiceContainer)
 {
 }