[Mono-bugs] [Bug 60386][Wis] New - DrawString method problem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 17 Jun 2004 22:51:13 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by shiziye@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=60386

--- shadow/60386	2004-06-17 22:51:13.000000000 -0400
+++ shadow/60386.tmp.28393	2004-06-17 22:51:13.000000000 -0400
@@ -0,0 +1,42 @@
+Bug#: 60386
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: shiziye@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DrawString method problem
+
+This program should generate a black picture with white string "hello" on 
+it. It works correctly on windows2003. But generate error with mono. 
+But if I set r = new Rectangle(20, 20, 0, 0), it work fine.
+
+/******************************* code begin ******************************/
+
+using System;
+using System.Drawing;
+
+class Class1
+{
+	public static void Main()
+	{
+		Bitmap image = new Bitmap(200, 100);
+		Graphics g = Graphics.FromImage(image);
+		Rectangle r = new Rectangle(20, 20, 180, 180);
+		g.DrawString("hello", new Font(FontFamily.GenericSerif, 
+32), Brushes.White, r);
+		g.Dispose();
+		image.Save("image.jpg", 
+System.Drawing.Imaging.ImageFormat.Jpeg);
+	}
+}
+/******************************* code end ********************************/