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