bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix, NSBezierPath, appendBezierPathWithArc...


From: Georg Fleischmann
Subject: Fix, NSBezierPath, appendBezierPathWithArc...
Date: Wed, 1 Aug 2001 20:14:41 +0200

Hi,

here is a little patch for [NSBezierPath appendBezierPathWithArc...].
It draws a line segment to the start point of the arc. A move is only used if  
the arc is the first element in the path. This makes the method more complient  
to the PostScript specs, and is needed to make complex paths work at all.

Georg


2001-08-01  Georg Fleischmann

        * gui/Source/NSBezierPath.m
        [NSBezierPath appendBezierPathWithArc...]:
        draw lineto to start point of arc


diff -u gui/Source/NSBezierPath.m.old gui/Source/NSBezierPath.m
--- gui/Source/NSBezierPath.m.old       Sat May 19 04:31:27 2001
+++ gui/Source/NSBezierPath.m   Wed Aug  1 18:06:06 2001
@@ -911,7 +911,14 @@
   /* Start point */
   p0 = NSMakePoint (center.x + radius * cos (startAngle_rad),
                    center.y + radius * sin (startAngle_rad));
-  [self moveToPoint: p0];
+  if (![self elementCount])
+    [self moveToPoint: p0];
+  else
+  {
+    NSPoint ps = [self currentPoint];
+    if (p0.x != ps.x || p0.y != ps.y)
+      [self lineToPoint: p0];
+  }

   while ((clockwise) ? (startAngle_rad > endAngle_rad)
         : (startAngle_rad < endAngle_rad))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]