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

DrawBackRoundedTopLeftWhite() private method

private DrawBackRoundedTopLeftWhite ( 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 DrawBackRoundedTopLeftWhite(RenderContext context,
                                                 Rectangle rect,
                                                 Rectangle gradientRect,
                                                 Color backColor1,
                                                 Color backColor2,
                                                 PaletteColorStyle backColorStyle,
                                                 float backColorAngle,
                                                 VisualOrientation orientation,
                                                 GraphicsPath path)
        {
            using (Clipping clip = new Clipping(context.Graphics, path))
            {
                // Draw entire background in white
                context.Graphics.FillRectangle(Brushes.White, rect);

                // Offset the drawing rectangle for the top and left
                rect.X++;
                rect.Y++;

                // Size is smaller in both directions because of offseting
                rect.Width--;
                rect.Height--;

                // Draw the second color as the offset background
                using (Brush backBrush = CreateColorBrush(gradientRect,
                                                          backColor1,
                                                          backColor2,
                                                          PaletteColorStyle.Rounded,
                                                          backColorAngle,
                                                          orientation))
                {
                    context.Graphics.FillRectangle(backBrush, rect);
                }
            }
        }
RenderStandard