kanato's picture

TextPrinter layout when width, height are zero.

Project:The Open Toolkit library
Category:bug report

On Windows, calling

			printer.Print("My text", font, Color.Yellow, new RectangleF(0, 30, 0, 0));

works as I would expect, the width, height properties are ignored and the text is drawn at (0, 30). On OpenSuse 11.1 the text is drawn at (0,0).

Also on Windows I notice that if the rectangle is smaller than the text, the stuff outside the rectangle gets drawn at 0,0 when it should just be clipped.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture


The first issue is a Mono GDI+ bug. This is likely to be fixed around the Mono 2.8 timeframe.

The only way to fix this on our side is to add a Mono.Pango-based IGlyphRasterizer to OpenTK.Utilities. If someone wishes to help with this, please make a post here.

I haven't been able to reproduce the second issue.

the Fiddler's picture


Status:open» in progress

Revision 1807 contains a workaround for the first issue. Working on the second.

the Fiddler's picture


Status:in progress» fixed

Second issue fixed in rev. 1809.

the Fiddler's picture


Status:fixed» closed

Closing issues resolved in 0.9.8.