[Mono-bugs] [Bug 61964][Nor] New - System hangs when drawing text to a bitmap
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 26 Jul 2004 14:52:43 -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 cnuernberger@extendthereach.com.
http://bugzilla.ximian.com/show_bug.cgi?id=61964
--- shadow/61964 2004-07-26 14:52:43.000000000 -0400
+++ shadow/61964.tmp.6207 2004-07-26 14:52:43.000000000 -0400
@@ -0,0 +1,79 @@
+Bug#: 61964
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Gentoo
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Normal
+Component: Sys.Drawing.
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: cnuernberger@extendthereach.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System hangs when drawing text to a bitmap
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: Computer hangs. It appears the libgdi stuff is
+hanging when drawing to a bitmap.
+
+
+Steps to reproduce the problem:
+1. Run program listed below
+============================================================
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Drawing.Imaging;
+class TestMain
+{
+ public static void Main()
+ {
+ Image img = new Bitmap( 300, 300,
+PixelFormat.Format32bppPArgb );
+ Graphics graphics = Graphics.FromImage( img );
+ // Get an array of the available font families.
+ FontFamily[] families = FontFamily.GetFamilies(graphics);
+ // Draw text using each of the font families.
+ Font familiesFont;
+ string familyString;
+ float spacing = 0;
+ foreach (FontFamily family in families)
+ {
+ try
+ {
+ familiesFont = new Font(family, 16,
+FontStyle.Bold);
+ familyString = "This is the " + family.Name
++ "family.";
+ graphics.DrawString(
+ familyString,
+ familiesFont,
+ Brushes.Black,
+ new PointF(0, spacing));
+ spacing += familiesFont.Height;
+ }
+ catch ( Exception e )
+ {
+ }
+ }
+ img.Save( "test.png", ImageFormat.Png );
+ }
+}
+================================================================
+Actual Results: System hung
+
+
+Expected Results: An image where the program was run with a white
+background and with text naming the font family on each line.
+
+
+How often does this happen? Every time.
+
+
+Additional Information: This also happens when someone tries to calculate
+the needed size of a text item, the Graphics.MeasureString method.