System.Drawing.Graphics.DrawIconUnstretched C# (CSharp) Method

DrawIconUnstretched() public method

public DrawIconUnstretched ( Icon icon, Rectangle targetRect ) : void
icon Icon
targetRect Rectangle
return void
        public void DrawIconUnstretched(Icon icon, Rectangle targetRect)
        {
            if (icon == null)
                throw new ArgumentNullException ("icon");

            //DrawImageUnscaled (icon.GetInternalBitmap (), targetRect);
            throw new NotImplementedException ();
        }

Usage Example

Example #1
0
        public void DrawIconUnstretched(Icon icon, Rectangle targetRect)
        {
            Bitmap currentBitmap = new Bitmap(icon.Width, icon.Height);

            System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(currentBitmap);

            g.DrawIconUnstretched(icon, new Rectangle(0, 0, targetRect.Width, targetRect.Height));
            this.DrawImage(currentBitmap, targetRect);

            //   currentBitmap.Dispose();
        }
All Usage Examples Of System.Drawing.Graphics::DrawIconUnstretched