[Mono-bugs] [Bug 409672] New: DrawEllipse renders translated after scaling the graphics transform.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 16 16:26:50 EDT 2008


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


           Summary: DrawEllipse renders translated after scaling the
                    graphics transform.
           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: Other


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

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

When assigning a scaling transform to a Graphics object, Graphics.DrawEllipse()
method renders fine under Windows and Win32 Mono, but translated under Mono for
Linux.


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

I have included (zipped) a solution created with Microsoft Visual C# Express
Edition. (Sorry, I'm a Windows developer) The source files and a release
executable are provided. A post-build step will copy the "Mono Bug 2 by
DAB.exe" to "bug2.exe" for ease-of-use on linux.

1. run the included bug2.exe on linux (mono bug2.exe)
2. cringe at the results


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

The included sample application creates a rectangle (rTest) 5 units in width
and height. A scaling factor is then calculated to map rTest to the Form's
client rectangle. This scaling factor is applied to the graphics object with 

Matrix X = new Matrix(fSceneScaler, 0, 0, fSceneScaler, 0, 0);
g.Transform = X;

when FillEllipse(...) is called, it works as expected, but when
DrawEllipse(...) is called, it will render translated by some fixed amount.

By changing the rTest size to something smaller, the effect is more dramatic.
By changing the rTest size to something larger (say 300 units), the effect
becomes negligable.

Since my cad-like application attempts to draw using units that are one-to-one,
the results are awful to look at.


Expected Results:
-----------------
The Linux output should match the Windows output, right?


How often does this happen?
---------------------------
Every Time.


Additional Information:
-----------------------

Images of the results found on windows (Windows.png), on mono for windows
(WinMono.png) and on mono for linux (LinuxMono-5.png) are included in the zip
file. Additionally, other rTest rectangle sizes are included (LinuxMono-25.png,
LinuxMono-75.png, LinuxMono-300.png)


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