[Mono-bugs] [Bug 338233] When using Pen.ScaleTransform on a Pen object, the app crashes with ArgumentException

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 1 08:45:30 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=338233#c5


Sebastien Pouliot <spouliot at novell.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |spouliot at novell.com
             Status|NEW                                             |ASSIGNED




--- Comment #5 from Sebastien Pouliot <spouliot at novell.com>  2007-11-01 06:45:30 MST ---
MS GDI+ doesn't return an error for scaling by 0.

Smaller test case:

using System;
using System.Drawing;
using System.Windows.Forms;

public class MainForm : Form {

        public MainForm ()
        {
                Paint += new PaintEventHandler (MainForm_Paint);
        }

        void MainForm_Paint (object sender, PaintEventArgs e)
        {
                Pen p = new Pen (Color.Red, 5);
                p.ScaleTransform (1, 0);
                e.Graphics.DrawLine (p, 10, 10, 100, 100);

                p.ResetTransform ();
                p.ScaleTransform (0, 1);
                e.Graphics.DrawLine (p, 100, 10, 10, 100);

                p.ResetTransform ();
                p.ScaleTransform (0, 0);
                e.Graphics.DrawLine (p, 55, 10, 55, 100);
        }

        [STAThread]
        static void Main ()
        {
                Application.Run (new MainForm ());
        }
}


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