private void DrawBackSolidLine(RenderContext context,
Rectangle rect,
Color backColor1,
Color backColor2,
PaletteColorStyle style,
GraphicsPath path)
{
using (Clipping clip = new Clipping(context.Graphics, path))
{
// Draw entire background in second color
using (SolidBrush brushColor2 = new SolidBrush(backColor2))
context.Graphics.FillRectangle(brushColor2, rect);
// Reduce area by edge(s) we want to leave alone
switch (style)
{
case PaletteColorStyle.SolidTopLine:
rect.Y++;
rect.Height--;
break;
case PaletteColorStyle.SolidBottomLine:
rect.Height--;
break;
case PaletteColorStyle.SolidLeftLine:
rect.X++;
rect.Width--;
break;
case PaletteColorStyle.SolidRightLine:
rect.Width--;
break;
case PaletteColorStyle.SolidAllLine:
rect.X++;
rect.Y++;
rect.Width -= 2;
rect.Height -= 2;
break;
}
// Draw the second color as a solid block
using (SolidBrush brushColor2 = new SolidBrush(backColor1))
context.Graphics.FillRectangle(brushColor2, rect);
}
}