kanato's picture

TextPrinter layout when width, height are zero.

Project:The Open Toolkit library
Version:0.9.x-dev
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed
Description

On Windows, calling

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

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.


Comments

Comment viewing options

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

#1

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

#2

Status:open» in progress

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

the Fiddler's picture

#3

Status:in progress» fixed

Second issue fixed in rev. 1809.

the Fiddler's picture

#4

Status:fixed» closed

Closing issues resolved in 0.9.8.