dotnet drawing api:
Hi, I'm trying to draw a rectangle around an image but for some reason for
the life of me I can't figure out why the rectangle is not drawn the same
width as the image any ideas?
using(Image newImage = GenerateBitmap())
{
Rectangle srcRect = new Rectangle(0,0, newImage.Width, newImage.Height);
GraphicsUnit units = GraphicsUnit.Pixel;
// Draw image to screen.
g.DrawImage(newImage,0, 0, srcRect, units);
Pen myPen = new Pen(Color.Red, 1);
g.DrawRectangle(myPen,srcRect);
}
Thanks