Multiple shapes
How would i go about drawing multiple shapes in to different locations on the screen? i have been searching on this forever...i would also like to be able to have them both move but around different axis as well..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlexPosted Jan 27, 2007, 4:47 PM
Mahesh ChandPosted Jan 25, 2007, 10:09 PM
To draw multiple drawing, you need the Graphics object for a canvas (for example a Form), which you can get in different ways. Some of them are -
1. Use OnPaint method event handler and use e.Graphics
2. Use CreateGraphics for a form or controls
After that, you use Draw and Fill methods to draw various objects.
If you want to add multiple shapes to a single object, you can use GraphicsPath and use Add method of GraphicsPath to add different shapes to it and use DrawPath of Graphics object to draw the path.