[Mono-bugs] [Bug 76907][Nor] New - System.Drawing.DrawCurve with
numberOfSegments problem
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Dec 3 23:23:21 EST 2005
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 contact at i-nz.net.
http://bugzilla.ximian.com/show_bug.cgi?id=76907
--- shadow/76907 2005-12-03 23:23:21.000000000 -0500
+++ shadow/76907.tmp.31780 2005-12-03 23:23:21.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 76907
+Product: Mono: Class Libraries
+Version: 1.1
+OS: other
+OS Details: SuSE Linux 10.0 and Windows XP Pro
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Drawing.
+AssignedTo: duncan at ximian.com
+ReportedBy: contact at i-nz.net
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: System.Drawing.DrawCurve with numberOfSegments problem
+
+Description of Problem:
+
+public void DrawCurve(
+ Pen pen,
+ Point[] points,
+ int offset,
+ int numberOfSegments,
+ float tension
+);
+
+doesn't draw a proper curve, when you use an array and pass a specified
+number of elements of the array as numberOfSegments. Haven't checked the
+other overloaded methods which use numberOfSegments.
+
+Steps to reproduce the problem:
+Check the test case.
+
+How often does this happen?
+Always
+
+Additional Information:
+
+--------------------Test case:------------------
+
+using System;
+using System.Drawing;
+
+class X {
+
+ static void Main ()
+ {
+ Point [] points = new Point [] {
+ new Point (56,276),
+ new Point (55,274),
+ new Point (54,269),
+ new Point (59,237),
+ new Point (70,213),
+ new Point (81,206),
+ new Point (95,211),
+ new Point (137,248),
+ new Point (176,260),
+ new Point (219,248),
+ new Point (251,220),
+ new Point (277,161),
+ new Point (283,92),
+
+ new Point (0,0),
+ new Point (0,10),
+ new Point (0,20) };
+
+ Bitmap b = new Bitmap (300, 300);
+ Graphics g = Graphics.FromImage (b);
+ Pen p = new Pen (Color.Black, 3);
+
+ g.FillRectangle (Brushes.White, new Rectangle (0, 0, 300, 300));
+ g.DrawCurve (p, points, 0, points.Length - 3, 1.0f);
+ g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias ;
+ b.Save ("curve.png");
+ }
+}
More information about the mono-bugs
mailing list