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

DrawBackRounding5() private method

private DrawBackRounding5 ( 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 DrawBackRounding5(RenderContext context,
                                       Rectangle rect,
                                       Rectangle gradientRect,
                                       Color backColor1,
                                       Color backColor2,
                                       PaletteColorStyle backColorStyle,
                                       float backColorAngle,
                                       VisualOrientation orientation,
                                       GraphicsPath path)
        {
            // We want to ignore the ourside pixel edge, so inflate inwards
            rect.Inflate(-1, -1);

            // 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.Rounding5, backColorAngle,
                                                          orientation))
                {
                    context.Graphics.FillPath(backBrush, path);
                }
            }
        }
RenderStandard