I need to draw a circle on top of an image in C#, so whenever the dice in my game is rolled a circle is placed upon the corresponding box.
How could I go about this? I have the image already, just need to be pointed in the direction of drawing the circle.
Drawing in C#
Started by Alex_j, May 08 2010 07:17 AM
1 reply to this topic
#1
Posted 08 May 2010 - 07:17 AM
|
|
|
#2
Posted 15 May 2010 - 09:52 AM
You will need the coordinates in the form of the upper left corner of the image. You can get them in the designer file.
Graphics g = pe.Graphics;
Brush b = new SolidBrush(Color.Black);
Pen x = new Pen(b);
g.DrawEllipse(pent, XCoordinate, YCoordinate, Width, Height);
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics


Sign In
Create Account


Back to top









