[Mono-bugs] [Bug 410466] New: Lines are disappearing

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jul 18 14:07:27 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=410466


           Summary: Lines are disappearing
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Drawing.
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: david.bobeck at precisepath.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=228842)
 --> (https://bugzilla.novell.com/attachment.cgi?id=228842)
Windows Zip

Description of Problem:
----------------------- 

When drawing on a graphics object, lines with pen widths thinner than 1
pixel ALWAYS render on Windows and Win Mono, but disappear on Linux.


Steps to reproduce the problem:
-------------------------------

I have included (zipped) a solution created with Microsoft Visual C# Express
Edition. The source files and a release executable are provided. A post-build
step will copy the exe to 'bug6.exe' for ease-of-use on linux.

1. run the included exe on linux (mono bug6.exe)
2. observe the rendering results.
3. you can stretch and shrink the application window horizontally to see the
lines disappear and reappear.


Actual Results:
---------------

The included sample application creates 7 pens of varying thicknesses....
  Pen pen1 = new Pen(Color.Black, 4);
  Pen pen2 = new Pen(Color.Black, 3);
  Pen pen3 = new Pen(Color.Black, 2);
  Pen pen4 = new Pen(Color.Black, 1);
  Pen pen5 = new Pen(Color.Black, 0.5f);
  Pen pen6 = new Pen(Color.Black, 0.25f);
  Pen pen7 = new Pen(Color.Black, 0.1f);

The lines drawn with pen widths 4,3,2,1 are ALWAYS visible, and the others
disappear. Perhaps after scaling is applied, pen widths less than 1.0f
could be coerced to 1.0f before used in rendering ??


Expected Results:
-----------------
It may be arguable that Linux (Cairo?) is doing the correct thing, but
nevertheless it does not match what is rendered by Windows. I expect the
lines to be visible at any scaling. Applications that implement zooming
will suffer from this anomoly.


How often does this happen?
---------------------------
Every time, although by stretching/shrinking the application window
horizontally, you will see that lines less than 1 pixel will sometimes appear.


Additional Information:
-----------------------
- These sample sources were compiled on Windows XP SP2.
- The Linux results were seen on Fedora Core 3 running Mono 1.9.1 installed
from the RedHat distribution package.
- The Linux results were also seen on Fedora Core 7 running Mono 1.9.1 compiled
manually from the sources download.

Images of the results found on windows (Windows.png), on mono for windows
(WinMono.png) and on mono for linux (LinuxMono.png) are included in the zip
file.


-- 
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