Could someone tell me how i could accomplish this?
Basically .. i want to draw a circle and fill it with a colour. Could you show me the code thats needed to do this?
Printable View
Could someone tell me how i could accomplish this?
Basically .. i want to draw a circle and fill it with a colour. Could you show me the code thats needed to do this?
You will need a control or form.
Some of my code mixed with code from C# help samples
Code:Graphics my_graph = CreateGraphics();
...
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create location and size of ellipse.
int x = 0;
int y = 0;
int width = 200;
int height = 100;
// Fill ellipse on screen.
my_graph.FillEllipse(redBrush, x, y, width, height);
Hmm, ive tried the code, but it doesn't draw it... Am I missing something?
Nevermind, i got it to work. Thx!
Don't forget to call Dispose() on my_graph when you are done with it.