Parcourir la source

* Graphics.cs: MSDN says that using image width and height gives
better performance, hence we are using image width and height to
avoid autoscaling in DrawImageUnscaled.

svn path=/trunk/mcs/; revision=33805

Ravindra il y a 21 ans
Parent
commit
d26ef9745b

+ 6 - 0
mcs/class/System.Drawing/System.Drawing/ChangeLog

@@ -1,3 +1,9 @@
+2004-09-13  Ravindra <[email protected]>
+
+	* Graphics.cs: MSDN says that using image width and height gives
+	better performance, hence we are using image width and height to
+	avoid autoscaling in DrawImageUnscaled.
+
 2004-09-10  Ravindra <[email protected]>
 
 	* Graphics.cs: Implemented DrawIcon methods and fixed

+ 2 - 2
mcs/class/System.Drawing/System.Drawing/Graphics.cs

@@ -660,14 +660,14 @@ namespace System.Drawing
 		
 		public void DrawImageUnscaled (Image image, int x, int y)
 		{
-			DrawImage (image, x, y);
+			DrawImage (image, x, y, image.Width, image.Height);
 		}
 
 		public void DrawImageUnscaled (Image image, int x, int y, int width, int height)
 		{
 			Image tmpImg = new Bitmap (width, height);
 			Graphics g = FromImage (tmpImg);
-			g.DrawImage (image, 0, 0);
+			g.DrawImage (image, 0, 0, image.Width, image.Height);
 			this.DrawImage (tmpImg, x, y, width, height);
 			tmpImg.Dispose ();
 			g.Dispose ();