The following code draws a cross:
using (SolidBrush brush = new SolidBrush(Color.FromArgb(192, 99, 104, 113)))
{
using(GraphicsPath path = new GraphicsPath())
{
path.AddRectangle(new Rectangle(e.ClipRectangle.X + (e.ClipRectangle.Width - 40) / 2, e.ClipRectangle.Y, 40, e.ClipRectangle.Height));
path.AddRectangle(new Rectangle(e.ClipRectangle.X, e.ClipRectangle.Y + (e.ClipRectangle.Height - 40) / 2, e.ClipRectangle.Width, 40));
path.FillMode = FillMode.Winding;
e.Graphics.DrawPath(Pens.DimGray, path);
}
}
I would like to draw it like so:
I've tried using Flatten();
and CloseAllFigures();
but these don't work.
I'm looking for an effect like Union:
Is this possible with GraphicsPath?