shade a circle

Dec 17 2006 11:24 PM

Hi,

I have an image which is of circle type. I used fillregion method to fill certain point of the image.The problem i face is when I shade the color comes out the circle. how to crop it?

Any help will be highly appreciated.

Please find the following code I have used. you can see that shading coming out of circle.

 private void button1_Click(object sender, EventArgs e)
        {
           g = this.CreateGraphics();
           RectangleF r1 = new Rectangle(0,0,50,50);
           Pen p1 = new Pen(Color.Red);
           g.DrawEllipse(p1, r1);

           RectangleF rf = new RectangleF(30,10, 20, 20);
           Region reg = new Region(rf);
           HatchBrush hb = new HatchBrush(HatchStyle.Cross, Color.Bisque);
         
           g.FillRegion(hb, reg);
         
        }


Thanks