Bug 322320 (MONO79614) - Rendering problems
Summary: Rendering problems
Status: RESOLVED DUPLICATE of bug 327039
Alias: MONO79614
Product: Mono: Class Libraries
Classification: Mono
Component: libgdiplus (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: 1_2
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard: LinkLabel
Keywords:
Depends on: MONO82291 327039
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-07 16:53 UTC by Jordi Mas
Modified: 2008-05-05 14:16 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
At the top you can see the sample with Microsoft .net and the bottom how it looks with Mono on Win32 (15.27 KB, image/jpeg)
2006-10-07 16:59 UTC, Thomas Wiest
Details
Screenshot (69.85 KB, image/jpeg)
2007-10-29 23:05 UTC, Jonathan Pobst
Details
Screenshot of Linux issue (32.77 KB, image/png)
2007-10-30 16:58 UTC, Jonathan Pobst
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:12:24 UTC


---- Reported by jordimash@gmail.com 2006-10-07 09:53:41 MST ----





---- Additional Comments From jordimash@gmail.com 2006-10-07 09:57:29 MST ----

swf-linklabels.exe sample at winforms/linklabel does not shows strings
with multiple links correctly under win32. It works fine on Linux.



---- Additional Comments From jordimash@gmail.com 2006-10-07 09:59:12 MST ----

Created an attachment (id=170617)
At the top you can see the sample with Microsoft .net and the bottom how it looks with Mono on Win32




---- Additional Comments From toshok@ximian.com 2006-10-09 10:55:00 MST ----

I'm guessing this has something to do with a difference in behavior
between our libgdi MeasureCharacterRanges and microsoft's, since it
works fine on linux and .net but not mono on windows.



---- Additional Comments From sebastien@ximian.com 2006-10-10 09:29:35 MST ----

The output seems ok on linux as reported, however the sample app dies
a few second after showing it's window.

Unhandled Exception: System.NullReferenceException: Object reference
not set to an instance of an object
  at System.Windows.Forms.XplatUIX11.SendMessage (IntPtr hwnd, Msg
message, IntPtr wParam, IntPtr lParam) [0x00007] in
/home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:4198
  at System.Windows.Forms.XplatUIX11.GetMessage (System.Object
queue_id, System.Windows.Forms.MSG& msg, IntPtr handle, Int32
wFilterMin, Int32 wFilterMax) [0x01052] in
/home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs:3507
  at System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id,
System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32
wFilterMax) [0x00000] in
/home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs:524
  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
System.Windows.Forms.ApplicationContext context) [0x002b2] in
/home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:543
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form
mainForm) [0x00000] in
/home/poupou/svn/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Application.cs:421
  at MyFormProject.MainForm.Main (System.String[] args) [0x00000]

I'm updating to latest SVN to try again...



---- Additional Comments From sebastien@ximian.com 2006-10-10 10:57:14 MST ----

The NRE isn't present using "this morning" SVN.

Using the "shouldn't be visible" focus rectangle it seems we display
some "empty" space before the text. It looks like this is our missing
space at the right end of the string (length is ok). For example look
at the red-background label, the text should start much closer to the
left than what we're displaying.

There are a few other bugs visible when running the sample (besides
the aft-mentioned focus). I have a fix for the label alignement (e.g.
center, right).



---- Additional Comments From toshok@ximian.com 2006-10-10 14:04:22 MST ----

i've committed the alignment fix (using ClientRectangle instead of
layout_rect.)

going to look at MeasureCharacterRanges now.  looks like it's not
offseting the regions properly?



---- Additional Comments From toshok@ximian.com 2006-10-18 01:29:42 MST ----

looks like the only remaining problem as far as this bug goes is the
word Mozilla in the last link in the UI.  the entire word shows the
link cursor, and clicking anywhere on it activates the link.  But the
focus rectangle shows the right placement/length..  so I'm thinking
this is probably in the LinkLabel code.



---- Additional Comments From toshok@ximian.com 2006-10-30 22:38:15 MST ----

updated summary



---- Additional Comments From toshok@ximian.com 2006-10-30 22:38:33 MST ----

*** https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has been marked as a duplicate of this bug. ***



---- Additional Comments From toshok@ximian.com 2006-10-30 22:39:07 MST ----

https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has another testcase, this one just for the actual text
layout, and not for the link pieces.



---- Additional Comments From toshok@ximian.com 2007-01-11 18:52:31 MST ----

*** https://bugzilla.novell.com/show_bug.cgi?id=MONO79765 has been marked as a duplicate of this bug. ***

Imported an attachment (id=170617)

Unknown operating system Windows XP (Cygwin). Setting to default OS "Other".

Comment 1 Jonathan Pobst 2007-10-29 23:05:34 UTC
Created attachment 181105 [details]
Screenshot
Comment 2 Jonathan Pobst 2007-10-29 23:06:14 UTC
This looks fixed in SVN.  Screenshot attached.  Marking as Fixed.
Comment 3 Everaldo Canuto 2007-10-30 02:06:42 UTC
Hey, it looks to be fixed because I already fixed it for Windows, but still have problem on X11, I will reopen and reassign again to me.
Comment 4 Jonathan Pobst 2007-10-30 02:58:20 UTC
Oops, my bad.  Can you please update the bug with what is still wrong?  Thanks!
Comment 5 Everaldo Canuto 2007-10-30 14:22:59 UTC
Hey :)

Because we have different measure text results on our libgdiplus implementation, links don't works fine for X11. We must decide what to do, fix current backend or work in pango backend.

Also we must check our libgdiplus priorities.
Comment 6 Jonathan Pobst 2007-10-30 16:58:47 UTC
Created attachment 181276 [details]
Screenshot of Linux issue
Comment 7 Everaldo Canuto 2007-11-06 04:43:20 UTC
Confirmed, it is an libgdiplus measurement problem.
Comment 8 Everaldo Canuto 2008-04-25 03:07:07 UTC
Tested again and in WinForms side everything is ok, that is why it works in Win32. In Libgdiplus the measurement functions dont take care about alignment.

Changing component to libgdiplus and dependent on bug #324960.
Comment 9 Sebastien Pouliot 2008-05-05 14:16:27 UTC

*** This bug has been marked as a duplicate of bug 327039 ***