[Mono-bugs] [Bug 81374][Wis] New - Drawing primitives get clipped when using large coordinates
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Apr 13 20:05:31 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by adam at chodorowski.com.
http://bugzilla.ximian.com/show_bug.cgi?id=81374
--- shadow/81374 2007-04-13 20:05:31.000000000 -0400
+++ shadow/81374.tmp.11471 2007-04-13 20:05:31.000000000 -0400
@@ -0,0 +1,74 @@
+Bug#: 81374
+Product: Mono: Class Libraries
+Version: 1.2
+OS: other
+OS Details: Gentoo
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: adam at chodorowski.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Drawing primitives get clipped when using large coordinates
+
+Description of problem:
+Drawing primitives (ellipses, rectangles, etc) are clipped when using
+coordinates larger than 2^14 (16384) even though a global translation
+transform has been set that should cause them to be drawn fully visible.
+
+Code (will also attach a copy):
+using System;
+using System.Windows.Forms;
+using System.Drawing;
+
+class TestForm : Form
+{
+ protected override void OnPaint(PaintEventArgs ea)
+ {
+ base.OnPaint(ea);
+ Graphics g = ea.Graphics;
+
+ Point center = new Point(1 << 14, 1 << 14);
+ int length = 100;
+ Point topleft = new Point(center.X - length / 2, center.Y - length
+/ 2);
+
+ g.TranslateTransform(Width / 2 - center.X, Height / 2 - center.Y);
+ g.DrawRectangle(new Pen(Color.Green), topleft.X, topleft.Y,
+length, length);
+ g.DrawEllipse(new Pen(Color.Blue), topleft.X, topleft.Y, length,
+length);
+ }
+
+ protected override void OnResize(EventArgs ea)
+ {
+ base.OnResize(ea);
+ Invalidate();
+ }
+
+ public static void Main(string[] args)
+ {
+ Application.Run(new TestForm());
+ }
+}
+
+
+Actual Results:
+With Mono, the shapes are clipped where the lines extend beyond 2^14 in X
+or Y. With Microsoft.NET, the shapes are drawn correctly. (Will attach
+screenshots to this bug report.)
+
+Expected Results:
+Mono Windows.Forms should draw the sahpes correctly.
+
+How often does this happen?
+Always.
+
+Additional Information:
+Mono 1.2.3.1
+libgdiplus 1.2.3
More information about the mono-bugs
mailing list