ComponentFactory.Krypton.Toolkit.RenderStandard.DrawBackLinearShadow C# (CSharp) Method

DrawBackLinearShadow() private method

private DrawBackLinearShadow ( RenderContext context, Rectangle rect, Rectangle gradientRect, Color backColor1, Color backColor2, PaletteColorStyle backColorStyle, float backColorAngle, VisualOrientation orientation, GraphicsPath path ) : void
context RenderContext
rect System.Drawing.Rectangle
gradientRect System.Drawing.Rectangle
backColor1 Color
backColor2 Color
backColorStyle PaletteColorStyle
backColorAngle float
orientation VisualOrientation
path System.Drawing.Drawing2D.GraphicsPath
return void
        private void DrawBackLinearShadow(RenderContext context,
                                          Rectangle rect,
                                          Rectangle gradientRect,
                                          Color backColor1,
                                          Color backColor2,
                                          PaletteColorStyle backColorStyle,
                                          float backColorAngle,
                                          VisualOrientation orientation,
                                          GraphicsPath path)
        {
            // Prevent drawing over that ourside edge
            using (Clipping clip = new Clipping(context.Graphics, rect))
            {
                // Use standard helper routine to create appropriate color brush
                using (Brush backBrush = CreateColorBrush(gradientRect, backColor1, backColor2,
                                                          PaletteColorStyle.Linear, backColorAngle,
                                                          orientation))
                {
                    context.Graphics.FillPath(backBrush, path);
                }

                // Use path gradient to give the outside of the area a shadow effect
                using (PathGradientBrush borderBrush = new PathGradientBrush(path))
                {
                    borderBrush.Blend = _linearShadowBlend;
                    borderBrush.CenterColor = backColor1;
                    borderBrush.SurroundColors = new Color[] { backColor2 };
                    context.Graphics.FillPath(borderBrush, path);
                }
            }
        }
RenderStandard