我用GDI画了一个圆
g.DrawEllipse(mypen, intX, intY, 100, 100);
现在想用画刷给这个圆填充颜色
但不知道该怎么写代码
求教

解决方案 »

  1.   

      SolidBrush redBrush = new SolidBrush(Color.Red);
                 
        // Create rectangle for ellipse.
        int x = 0;
        int y = 0;
        int width = 200;
        int height = 100;
        Rectangle rect = new Rectangle(x, y, width, height);
                 
        // Fill ellipse on screen.
        g.FillEllipse(redBrush, rect);