Artemis.Utilities.Keyboard.KeyboardRectangle.CreateBrush C# (CSharp) Метод

CreateBrush() приватный Метод

private CreateBrush ( ) : LinearGradientBrush
Результат System.Drawing.Drawing2D.LinearGradientBrush
        private LinearGradientBrush CreateBrush()
        {
            var colorBlend = CreateColorBlend();
            RectangleF rect;
            if (Rotate)
                rect = ContainedBrush
                    ? new Rectangle((int) _rotationProgress, Y, Width*2, Height*2)
                    : new Rectangle((int) _rotationProgress, 0, _keyboard.Width*Scale*2, _keyboard.Height*Scale*2);
            else
                rect = ContainedBrush
                    ? new Rectangle(X, Y, Width, Height)
                    : new Rectangle(0, 0, _keyboard.Width*Scale, _keyboard.Height*Scale);

            return new LinearGradientBrush(rect, Color.Transparent, Color.Transparent, GradientMode)
            {
                InterpolationColors = colorBlend
            };
        }