[Mono-bugs] [Bug 82562][Cos] New - Graphics.Drawing - method draws text differently in a rectangle than windows.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Aug 24 04:03:54 EDT 2007


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 krishna at globalmultimedia.in.

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

--- shadow/82562	2007-08-24 04:03:54.000000000 -0400
+++ shadow/82562.tmp.14069	2007-08-24 04:03:54.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 82562
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: Debian Lenny
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Cosmetic
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: krishna at globalmultimedia.in               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Graphics.Drawing - method draws text differently in a rectangle than windows. 
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+The characters are not drawn correctly in mono.  Or it is wrong in 
+windows.
+
+There is one/two pixel difference in arriving at the starting pixel of 
+the character.
+
+Steps to reproduce the problem:
+public Form1()
+		{
+			InitializeComponent();
+		}
+
+		private void Form1_Paint(object sender, PaintEventArgs e)
+		{
+			System.Drawing.Graphics g = e.Graphics;
+			System.Drawing.Font font = new System.Drawing.Font
+("Arial Narrow", 39);
+			Rectangle rect = new Rectangle(0, 0, 98, 58);
+			int count = 12;
+			SolidBrush textcolor = new SolidBrush(Color.Red);
+			while (rect.Y < 200)
+			{
+				rect.X = 0;
+				while (rect.X < 800)
+				{
+					g.FillRectangle(Brushes.Black, 
+rect);
+					g.DrawString(count.ToString(), 
+font, textcolor, rect);
+					rect.X += 100;
+					count+= 11;
+				}
+				rect.Y += 60;
+			}
+		}
+
+
+Actual Results:
+
+Run the program in mono.
+
+Expected Results:
+
+Run the program under windows to see the difference
+
+
+How often does this happen? 
+computation related to rendering the text. 
+
+Additional Information:
+
+Trying to use System.Drawing to draw a data grid with custom coloring of 
+each cell.


More information about the mono-bugs mailing list