From 06f41f0d1c5b199d7d6bd8388f61cdc1da9d4682 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 8 Nov 2009 00:19:53 +0000 Subject: [PATCH] added circle and star-polygon svn: r16617 original commit: faf055c8580fe4eb2345919c1a622d865115913f --- collects/mrlib/image-core.ss | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/collects/mrlib/image-core.ss b/collects/mrlib/image-core.ss index 20bbcedb..e5b1ce6d 100644 --- a/collects/mrlib/image-core.ss +++ b/collects/mrlib/image-core.ss @@ -151,8 +151,11 @@ has been moved out). (null? p2-points)) (and (not (or (null? p1-points) (null? p2-points))) - (eq-recur (rotate-to-zero (closest-to-zero p1-points) p1-points) - (rotate-to-zero (closest-to-zero p2-points) p2-points))))))) + (or (eq-recur (rotate-to-zero (closest-to-zero p1-points) p1-points) + (rotate-to-zero (closest-to-zero p2-points) p2-points)) + (let ([p1-rev (reverse p1-points)]) + (eq-recur (rotate-to-zero (closest-to-zero p1-rev) p1-rev) + (rotate-to-zero (closest-to-zero p2-points) p2-points))))))))) (define (rotate-to-zero zero-p points) (let loop ([points points] @@ -412,7 +415,7 @@ has been moved out). (send path line-to (point-x (car points)) (point-y (car points))) (send dc set-pen (mode-color->pen (polygon-mode simple-shape) (polygon-color simple-shape))) (send dc set-brush (mode-color->brush (polygon-mode simple-shape) (polygon-color simple-shape))) - (send dc draw-path path dx dy))] + (send dc draw-path path dx dy 'winding))] [else (let ([dx (+ dx (translate-dx simple-shape))] [dy (+ dy (translate-dy simple-shape))]