I have having trouble with my c# gdi code
I have been trying to create a generic list of graphic objects.
the code works fine for the first object but all subsequent objects are not working properly. I have included an image to show the desired effect.

any help would be appreciated

    
     public partial class Form1 : Form
     {
        GraphicList graphicCollection = new GraphicList();
    public Form1()
    {
   
      graphicCollection.Add(new GraphicObj("obj_1", 200, 10, 125, 125));
      graphicCollection.Add(new GraphicObj("obj_2"  , 10, 10  , 125, 125));
   
      this.Paint += new PaintEventHandler(Form1_Paint);
    

    }
     void Form1_Paint(object sender, PaintEventArgs e)
    {

      graphicCollection.draw(e.Graphics);
    }
    }

list object

    public class GraphicList : List<GraphicObj>
    {

     
    public void draw(Graphics g)
    {
      for (int i = 0; i < this.Count; i++)
        this[i].Draw(g);
    }

    }


Graphics Object class

       public class GraphicObj
     {
    public string Name
    {
      get;
      set;
    }
    public Point Location
    {
      get;
      set;
    }
    public int width
    {
      get;
      set;
    }
    public int height
    {
      get;
      set;
    }

     
    int state = 2;
    
    public GraphicObj(string name, int x, int y, int _width, int _height)
    {
      Name = name;
      Location = new Point(x, y);
      width = _width;
      height = _height;
    }

    public Color AdjustBrightness(Color c1, float factor)
    {
      float r = ((c1.R * factor) > 255) ? 255 : (c1.R * factor);
      float g = ((c1.G * factor) > 255) ? 255 : (c1.G * factor);
      float b = ((c1.B * factor) > 255) ? 255 : (c1.B * factor);
      Color c = Color.FromArgb(c1.A, (int)r, (int)g, (int)b);
      return c;
    }
     
    public void Draw(Graphics gfx)
    {
      
     Rectangle r = new Rectangle(Location.X, Location.Y, width, height);
    
      GraphicsPath pTemp = new GraphicsPath();
 
      pTemp.AddEllipse(r);
      Color[] colors = new Color[3];

      colors[0] = Color.Green;
      colors[1] = AdjustBrightness(Color.LightCyan, 0.8f);
      colors[2] = Color.FromArgb(230, 250, 230);


      float[] positions = new float[3];
      positions[0] = 0f;
      positions[1] = 0.81f;
      positions[2] = 1f;

      ColorBlend Cb = new ColorBlend();
      Cb.Colors = colors;
      Cb.Positions = positions;

      PathGradientBrush pgb = new PathGradientBrush(pTemp);
      pgb.InterpolationColors = Cb;
      pgb.CenterPoint = new PointF(this.width * .75f, this.width * .35f); ;
      gfx.FillPath(pgb, pTemp);
 
      if (pTemp != null)
        pTemp.Dispose();

      if (pgb != null)
        pgb.Dispose();
    }

    }


![alt text][1]


  [1]: http://i939.photobucket.com/albums/ad236/b_p_b/Sphere.jpg
I have having trouble with my c# gdi code
===

I have been trying to create a generic list of graphic objects.
the code works fine for the first object but all subsequent objects are not working properly. I have included an image to show the desired effect.

any help would be appreciated

    
     public partial class Form1 : Form
     {
        GraphicList graphicCollection = new GraphicList();
    public Form1()
    {
   
      graphicCollection.Add(new GraphicObj("obj_1", 200, 10, 125, 125));
      graphicCollection.Add(new GraphicObj("obj_2"  , 10, 10  , 125, 125));
   
      this.Paint += new PaintEventHandler(Form1_Paint);
    

    }
     void Form1_Paint(object sender, PaintEventArgs e)
    {

      graphicCollection.draw(e.Graphics);
    }
    }

list object

    public class GraphicList : List<GraphicObj>
    {

     
    public void draw(Graphics g)
    {
      for (int i = 0; i < this.Count; i++)
        this[i].Draw(g);
    }

    }


Graphics Object class

       public class GraphicObj
     {
    public string Name
    {
      get;
      set;
    }
    public Point Location
    {
      get;
      set;
    }
    public int width
    {
      get;
      set;
    }
    public int height
    {
      get;
      set;
    }

     
    int state = 2;
    
    public GraphicObj(string name, int x, int y, int _width, int _height)
    {
      Name = name;
      Location = new Point(x, y);
      width = _width;
      height = _height;
    }

    public Color AdjustBrightness(Color c1, float factor)
    {
      float r = ((c1.R * factor) > 255) ? 255 : (c1.R * factor);
      float g = ((c1.G * factor) > 255) ? 255 : (c1.G * factor);
      float b = ((c1.B * factor) > 255) ? 255 : (c1.B * factor);
      Color c = Color.FromArgb(c1.A, (int)r, (int)g, (int)b);
      return c;
    }
     
    public void Draw(Graphics gfx)
    {
      
     Rectangle r = new Rectangle(Location.X, Location.Y, width, height);
    
      GraphicsPath pTemp = new GraphicsPath();
 
      pTemp.AddEllipse(r);
      Color[] colors = new Color[3];

      colors[0] = Color.Green;
      colors[1] = AdjustBrightness(Color.LightCyan, 0.8f);
      colors[2] = Color.FromArgb(230, 250, 230);


      float[] positions = new float[3];
      positions[0] = 0f;
      positions[1] = 0.81f;
      positions[2] = 1f;

      ColorBlend Cb = new ColorBlend();
      Cb.Colors = colors;
      Cb.Positions = positions;

      PathGradientBrush pgb = new PathGradientBrush(pTemp);
      pgb.InterpolationColors = Cb;
      pgb.CenterPoint = new PointF(this.width * .75f, this.width * .35f); ;
      gfx.FillPath(pgb, pTemp);
 
      if (pTemp != null)
        pTemp.Dispose();

      if (pgb != null)
        pgb.Dispose();
    }

    }


![alt text][1]


  [1]: http://i939.photobucket.com/albums/ad236/b_p_b/Sphere.jpg