[Mono-bugs] [Bug 449971] New: MeasureCharacterRanges treats empty layout rectangle incorrectly
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Nov 28 04:39:07 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=449971
Summary: MeasureCharacterRanges treats empty layout rectangle
incorrectly
Product: Mono: Class Libraries
Version: 1.9
Platform: x86-64
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Drawing.
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: stapostol at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=256444)
--> (https://bugzilla.novell.com/attachment.cgi?id=256444)
Test case
Description of Problem:
When MeasureCharacterRanges is passed an empty layout rectangle
(RectangleF.Empty), it produces incorrect results for the text layout.
Attached is a test case that demonstrates the issue (runs fine under .Net).
Steps to reproduce the problem:
1. Compile the test case with "gmcs Program.cs -r:System.Drawing.dll".
2. Run and compare the output between MeasureCharacterRanges with
RectangleF.Empty and new RectangleF(0, 0, 100, 100).
Actual Results:
Using rectangle {X=0,Y=0,Width=100,Height=100}:
{X=0,Y=0,Width=9,Height=18}
{X=9,Y=0,Width=9,Height=18}
{X=18,Y=0,Width=8,Height=18}
Using rectangle {X=0,Y=0,Width=0,Height=0}:
{X=-4194304,Y=-4194304,Width=8388608,Height=8388608}
{X=-4194304,Y=-4194304,Width=8388608,Height=8388608}
{X=-4194304,Y=-4194304,Width=8388608,Height=8388608}
Expected Results:
Using rectangle {X=0,Y=0,Width=100,Height=100}:
{X=0,Y=0,Width=9,Height=18}
{X=9,Y=0,Width=9,Height=18}
{X=18,Y=0,Width=8,Height=18}
Using rectangle {X=0,Y=0,Width=0,Height=0}:
{X=0,Y=0,Width=9,Height=18}
{X=9,Y=0,Width=9,Height=18}
{X=18,Y=0,Width=8,Height=18}
How often does this happen?
Always.
Additional Information:
The same program works correctly on .Net. Please note that your actual results
may differ slightly according to your installed fonts.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list