[Mono-bugs] [Bug 689465] New: Rotation transform works in Mono 1 x but fails in 2 x

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Apr 23 15:37:52 EDT 2011


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

https://bugzilla.novell.com/show_bug.cgi?id=689465#c0


           Summary: Rotation transform works in Mono 1 x but fails in 2 x
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.10.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: robin.verdier at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en)
AppleWebKit/533.19.4 (KHTML, like Gecko) Version/4.1.3 Safari/533.19.4

This is a minimal example of a c# program that works in .NET and Mono 1 but
fails under Mono 2+

// transforms.cs: c# test for translation and rotation
// 22-Apr-2011: Works correctly under
//   WindowsXP SP2 Version 2002
//   Mac OS 10.4.11 on PowerPC running Mono 
//   Mac OS 10.4.11 on Intel Core 2 Duo running Mono 1.2.6
// Transform distorted under Mac OS 10.5.8 in Intel Core 2 Duo running Mono
2.10.1.  The matrix elements are correct but the displayed result is wrong.
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows;
using System.Windows.Forms;
public class Transforms : Form
{ Transforms()
  { Paint += new PaintEventHandler (RotateTranslate);
  }
  public void RotateTranslate(object sender, PaintEventArgs e)
  { int x = 0, y = 0, width = 200, height = 80;
    Console.WriteLine ("Draw red {0} X {1} ellipse at {2}, {3}", width,
      height, x, y);
    e.Graphics.DrawEllipse(new Pen(Color.Red, 3), 0, 0, width, height);
// Translate x by 100 px.
    int dx = 100;
    Console.WriteLine ("Translate x by {0}", dx);
    e.Graphics.TranslateTransform((float)dx, 0.0F);
    e.Graphics.DrawEllipse(new Pen(Color.Green, 3), 0, 0, width, height);
// Rotate by 30 degrees.
    int angle = 30;
    Console.WriteLine ("Rotate ellipse by {0} degrees", angle);
    e.Graphics.RotateTransform((float)angle, MatrixOrder.Append);
    e.Graphics.DrawEllipse(new Pen(Color.Blue, 3), 0, 0, width, height);
  }
  public static void Main (String[] args)
  { Application.Run (new Transforms());
  }
}


Reproducible: Always

Steps to Reproduce:
1. Compile and run under .NET -- works
2. Same using Mono v 1.2.6 -- works
3. Same using Mono v 2.10 -- fails
Actual Results:  
Under Mono 2.10, display is badly distorted.

Expected Results:  
Mono 2.10 display agrees with .net and Mono 1.2.6

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list