ARCed.Core.ColorWheel.CreateGradient C# (CSharp) Method

CreateGradient() private method

private CreateGradient ( ) : void
return void
        private void CreateGradient()
        {
            using (var pgb =
                new PathGradientBrush(GetPoints(this._radius, new Point(this._radius, this._radius))))
            {
                pgb.CenterColor = Color.White;
                pgb.CenterPoint = new PointF(this._radius, this._radius);
                pgb.SurroundColors = GetColors();
                this._colorImage = new Bitmap(
                    this._colorRectangle.Width, this._colorRectangle.Height,
                    PixelFormat.Format32bppArgb);
                using (var newGraphics = Graphics.FromImage(this._colorImage))
                {
                    newGraphics.FillEllipse(pgb, 0, 0,
                        this._colorRectangle.Width, this._colorRectangle.Height);
                }
            }
        }