[Mono-bugs] [Bug 75015][Min] Changed - Verify PathType used in
GraphicsPath.AddArc
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri May 20 20:35:11 EDT 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 duncan at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=75015
--- shadow/75015 2005-05-20 18:11:17.000000000 -0400
+++ shadow/75015.tmp.20201 2005-05-20 20:35:11.000000000 -0400
@@ -2,22 +2,64 @@
Product: Mono: Class Libraries
Version: 1.1
OS: All
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Minor
Component: Sys.Drawing.
-AssignedTo: mono-bugs at ximian.com
+AssignedTo: duncan at ximian.com
ReportedBy: elbaami at gmail.com
QAContact: mono-bugs at ximian.com
TargetMilestone: ---
URL:
Cc:
-Summary: Easy to fix problem in libgdiplus
+Summary: Verify PathType used in GraphicsPath.AddArc
Line 578 of graphics-path.c (append_arc) should read PathPointTypeLine
instead of PathPointTypeStart.
PathPointTypeStart refers to the start of a sub-path, and
GraphicsPathes using Arcs are respectively misconstructed and disjointed.
+
+------- Additional Comments From duncan at ximian.com 2005-05-20 20:35 -------
+Do you have a test case that showcases this?
+
+Using a program like this, I haven't been able to get any data where
+we are outputting significantly different data from MS.NET 2.0 beta2.
+The only difference I've found so far is that we use one bezier for
+arcs where the sweep is less than 180°, where as they start using a
+2nd bezier after 90°. I'm going to draw these paths out now to see if
+it's worth it to emulate this behavior.
+
+using System;
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace Arcs
+{
+ class Program
+ {
+ static void Main (string [] args)
+ {
+ GraphicsPath path = new GraphicsPath ();
+ path.AddArc (100, 100, 100, 100, Int32.Parse (args [0]),
+Int32.Parse (args [1]));
+
+ Print (path);
+ }
+
+ static void Print (GraphicsPath path)
+ {
+ PointF [] points = path.PathPoints;
+ byte [] types = path.PathTypes;
+
+ for (int i = 0; i < points.Length; i++) {
+ Console.WriteLine (
+ "Point {0, 2}: {1, -7} at ({2}, {3})", i,
+ (PathPointType) types [i], points [i].X,
+points [i].Y);
+ }
+ }
+ }
+}
More information about the mono-bugs
mailing list