AlphaTab.Platform.CSharp.WinForms.AlphaTabControl.OnPaint C# (CSharp) Method

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
            e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
            e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;

            lock (this)
            {
                if (_images == null)
                {
                    return;
                }

                int y = 0;
                foreach (var image in _images)
                {
                    e.Graphics.DrawImage(image, new Rectangle(new Point(0, y), image.Size),
                        new Rectangle(Point.Empty, image.Size), GraphicsUnit.Pixel);
                    y += image.Height;
                }
            }
        }