This project is read-only.

SizeMode of Image

Jan 14, 2010 at 7:39 PM


 First of all.  Thanks for such a great job.  I was wondering how to resize a image so it could fit the size of my control?


Aug 31, 2010 at 4:14 PM

In order to do that, change the Draw method of AlphaImage:

// Draw the image, with alpha channel if any
IntPtr hdcDest = gx.GetHdc();
Rectangle dstRect = new Rectangle(bounds.X, bounds.Y, bounds.X + bounds.Width, bounds.Y + bounds.Height);//(int)imgInfo.Width + bounds.X, (int)imgInfo.Height + bounds.Y);
_image.Draw(hdcDest, ref dstRect, IntPtr.Zero);