private static GraphicsPath CreateTabBorderBackPath(RightToLeft rtl,
PaletteState state,
bool forBorder,
Rectangle rect,
int borderWidth,
TabBorderStyle tabBorderStyle,
VisualOrientation orientation,
bool smoothing)
{
GraphicsPath borderPath = new GraphicsPath();
// A zero size rectangle cannot be drawn, so return a null path
if ((rect.Width > 0) && (rect.Height > 0))
{
// Shrink the rect by half the width of the pen, because the pen will
// draw half the distance overlapping each side of the centre anyway.
int halfBorderWidth = borderWidth / 2;
// Adjust rectangle for all except the bottom edges
rect.Width -= (halfBorderWidth * 2);
rect.Height -= halfBorderWidth;
rect.X += halfBorderWidth;
rect.Y += halfBorderWidth;
// Populate the graphics path for the border style
CreateTabBorderPath((rtl == RightToLeft.Yes), state, forBorder,
borderPath, rect, tabBorderStyle, orientation);
}
return borderPath;
}