![]() |
| | #1 |
| Registered User Join Date: Aug 2007
Posts: 33
| How to draw shapes and output? Basically .. i want to draw a circle and fill it with a colour. Could you show me the code thats needed to do this? |
| Diablo02 is offline | |
| | #2 |
| Super Moderator Join Date: Aug 2001
Posts: 7,819
| 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);
|
| Bubba is offline | |
| | #3 |
| Registered User Join Date: Aug 2007
Posts: 33
| Hmm, ive tried the code, but it doesn't draw it... Am I missing something? Nevermind, i got it to work. Thx! Last edited by Diablo02; 11-19-2007 at 02:46 PM. |
| Diablo02 is offline | |
| | #4 |
| Super Moderator Join Date: Aug 2001
Posts: 7,819
| Don't forget to call Dispose() on my_graph when you are done with it. |
| Bubba is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|