AlphaTab.Rendering.EffectBarRenderer.AlignGlyph C# (CSharp) Method

AlignGlyph() private method

private AlignGlyph ( EffectBarGlyphSizing sizing, Beat beat ) : void
sizing EffectBarGlyphSizing
beat AlphaTab.Model.Beat
return void
        private void AlignGlyph(EffectBarGlyphSizing sizing, Beat beat)
        {
            EffectGlyph g = _effectGlyphs[beat.Voice.Index][beat.Index];
            Glyph pos;
            var container = GetBeatContainer(beat);
            switch (sizing)
            {
                case EffectBarGlyphSizing.SinglePreBeat:
                    pos = container.PreNotes;
                    g.X = BeatGlyphsStart + pos.X + container.X;
                    g.Width = pos.Width;
                    break;

                case EffectBarGlyphSizing.SingleOnBeat:
                case EffectBarGlyphSizing.GroupedOnBeat: // grouping is achieved by linking the normaly aligned glyphs
                    pos = container.OnNotes;
                    g.X = BeatGlyphsStart + pos.X + container.X;
                    g.Width = pos.Width;
                    break;
            }
        }