https://bugzilla.novell.com/show_bug.cgi?id=430577
Summary: DrawImage does not draw correctly when the start position is not (0,0) Product: Mono: Class Libraries Version: SVN Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libgdiplus AssignedTo: mono-bugs@lists.ximian.com ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: Community User Created an attachment (id=242197) --> (https://bugzilla.novell.com/attachment.cgi?id=242197) test results (png) When an image is written to a rectangle by DrawImage(), it does not draw correctly when the start position is not (0,0). Repro: using System; using System.Drawing; using System.Windows.Forms; class Test : Form { public static void Main() { Application.Run(new Test { ClientSize = new Size(128, 128) }); } protected override void OnPaint(PaintEventArgs e) { var dst = new Rectangle(20, 20, 50, 50); var px = GraphicsUnit.Pixel; var bmp = new Bitmap(32, 32); var g = Graphics.FromImage(bmp); g.Clear(Color.Black); e.Graphics.DrawImage(bmp, dst, new Rectangle(0, 0, 100, 100), px); g.Clear(Color.Red); e.Graphics.DrawImage(bmp, dst, new Rectangle(-16, -16, 100, 100), px); g.Clear(Color.Blue); e.Graphics.DrawImage(bmp, dst, new Rectangle(16, 16, 100, 100), px); g.Dispose(); bmp.Dispose(); } } Attached repro output. -- 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. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs