AlphaTab.Rendering.BarRendererBase.Paint C# (CSharp) Method

Paint() public method

public Paint ( float cx, float cy, ICanvas canvas ) : void
cx float
cy float
canvas ICanvas
return void
        public virtual void Paint(float cx, float cy, ICanvas canvas)
        {
            PaintBackground(cx, cy, canvas);

            canvas.Color = Resources.MainGlyphColor;

            _preBeatGlyphs.Paint(cx + X, cy + Y, canvas);

            foreach (var voice in _voiceContainers)
            {
                var c = _voiceContainers[voice];
                canvas.Color = c.Voice.Index == 0
                   ? Resources.MainGlyphColor
                   : Resources.SecondaryGlyphColor;
                c.Paint(cx + X, cy + Y, canvas);
            }

            canvas.Color = Resources.MainGlyphColor;
            _postBeatGlyphs.Paint(cx + X, cy + Y, canvas);
        }