[RESOLVED] Opposite region
Hiya
Ive painted a circle inside a usercontrol, and derived graphicspath and a region from it. Now, i want the exact opposite of my current region. I want to use fillregion to fill whats outside the region. Ideas please?
Current code:
Code:
Graphics gfx = this.CreateGraphics();
gfx.Clear(this.BackColor);
Pen myPen = new Pen(Color.Green);
gfx.SmoothingMode=SmoothingMode.HighQuality;
gfx.DrawEllipse(myPen,0,0,this.Width ,this.Height );
//gfx.DrawLine(myPen,this.Width,this.Height/2,0,this.Height/4);
GraphicsPath r = new GraphicsPath();
r.AddEllipse(0,0,this.Width,this.Height);
Region aa = new Region(r);
SolidBrush myBrush = new SolidBrush(Color.Red);
gfx.FillRegion(myBrush,aa);