https://bugzilla.novell.com/show_bug.cgi?id=383878
User [EMAIL PROTECTED] added comment https://bugzilla.novell.com/show_bug.cgi?id=383878#c2 --- Comment #2 from Sebastien Pouliot <[EMAIL PROTECTED]> 2008-04-25 13:32:34 MST --- using System; using System.Drawing; using System.Drawing.Drawing2D; class Program { static void Main () { Bitmap bitmap = new Bitmap (10, 10); Graphics graphic = Graphics.FromImage (bitmap); Matrix matrix = new Matrix (); Region clipRegion = new Region (); clipRegion.MakeInfinite (); Rectangle smaller = new Rectangle (5, 5, -10, -10); Rectangle bigger = new Rectangle (-5, -5, 12, 12); clipRegion.Intersect (smaller); Console.WriteLine ("INTERSECT"); Console.WriteLine (clipRegion.IsEmpty (graphic)); Console.WriteLine (clipRegion.IsInfinite (graphic)); RectangleF [] rects = clipRegion.GetRegionScans (matrix); foreach (RectangleF rect in rects) Console.WriteLine (rect); // this makes error in mono - linux, but not under Windows (xp): clipRegion.Complement (bigger); Console.WriteLine ("COMPLEMENT"); Console.WriteLine (clipRegion.IsEmpty (graphic)); Console.WriteLine (clipRegion.IsInfinite (graphic)); rects = clipRegion.GetRegionScans (matrix); foreach (RectangleF rect in rects) Console.WriteLine (rect); } } Under MS/WINDOWS INTERSECT False False {X=-5,Y=-5,Width=10,Height=10} COMPLEMENT False False {X=5,Y=-5,Width=2,Height=10} {X=-5,Y=5,Width=12,Height=2} Under Mono/Linux INTERSECT True False COMPLEMENT False False {X=-5,Y=-5,Width=12,Height=12} The negative width and height are the probable problem in the current code (i.e. it's considered empty by Mono's libgdiplus). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
