AlphaTab.Platform.CSharp.GdiCanvas.RecreateImage C# (CSharp) Method

RecreateImage() private method

private RecreateImage ( ) : void
return void
        private void RecreateImage()
        {
            var newImage = new Bitmap((int)_width, (int)_height, PixelFormat.Format32bppArgb);
            var newGraphics = Graphics.FromImage(newImage);
            newGraphics.SmoothingMode = SmoothingMode.HighQuality;
            newGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
            newGraphics.Clear(GdiColor.Transparent);

            if (_graphics != null)
                _graphics.Dispose();

            _image = newImage;
            _graphics = newGraphics;
        }