[Mono-bugs] [Bug 515850] Applying transform to drawings works incorrectly when PageUnit != Pixel

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jun 25 02:31:13 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=515850

User amorozov at vtc.ru added comment
http://bugzilla.novell.com/show_bug.cgi?id=515850#c1





--- Comment #1 from Alexey Morozov <amorozov at vtc.ru>  2009-06-25 00:31:12 MDT ---
I did more presicely testing and found that actual (bad) result is similiar if
it had produced by followed code

===

        Graphics g = e.Graphics;

       g.PageUnit = GraphicsUnit.Pixel;

            Pen pen = new Pen(Color.Black, 2);

            for(int x = 0; x < 5; x++)
                for (int y = 0; y < 5; y++)
                {
                    Matrix m = new Matrix(1 * g.DpiX / 72, 0, 0, 1 * g.DpiY /
72, x * 23 /* ! */, y * 23 /* ! */);

                    g.Transform = m;

                    g.DrawLine(pen, 5, 5, 25, 5);
                    g.DrawLine(pen, 25, 5, 25, 25);
                    g.DrawLine(pen, 25, 25, 5, 25);
                    g.DrawLine(pen, 5, 25, 5, 5);
                }
        }
===

This clearly show that issue cause is incomplete transformation matrix
processing. Scale elements are not adjusted during Point -> Pixel calculation
step.

-- 
Configure bugmail: http://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