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);
}
}
}