I am trying to draw an ellipse with specify x,y,width, and height for
input argument in C# .net (Visual Studio 2005).
It seem it will not draw for me. What am I missing?
See the code below, thanks.
//CODE
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows. Forms;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
draw(10, 20, 20, 50);
draw(50, 80, 50, 150);
}
private void draw(int x1, int y1, int w, int h)
{
Graphics g = this.CreateGrap hics();
g.FillEllipse(B rushes.Blue, x1, y1, w, h);
}
}
}
input argument in C# .net (Visual Studio 2005).
It seem it will not draw for me. What am I missing?
See the code below, thanks.
//CODE
using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows. Forms;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeCompo nent();
}
private void Form1_Load(obje ct sender, EventArgs e)
{
draw(10, 20, 20, 50);
draw(50, 80, 50, 150);
}
private void draw(int x1, int y1, int w, int h)
{
Graphics g = this.CreateGrap hics();
g.FillEllipse(B rushes.Blue, x1, y1, w, h);
}
}
}
Comment