Ho questo codice che disegna un rettangolo (Im cercando di rifare il MS Paint)cerchi di disegno con System.Drawing
case "Rectangle":
if (tempDraw != null)
{
tempDraw = (Bitmap)snapshot.Clone();
Graphics g = Graphics.FromImage(tempDraw);
Pen myPen = new Pen(foreColor, lineWidth);
g.DrawRectangle(myPen, x1, y1, x2-x1, y2-y1);
myPen.Dispose();
e.Graphics.DrawImageUnscaled(tempDraw, 0, 0);
g.Dispose();
}
Ma cosa succede se voglio disegnare un cerchio, che cosa cambierà?
g.DrawRectangle(myPen, x1, y1, x2-x1, y2-y1);
anche a te per la risposta – Tony