From 36d892a66fb2f8ee29e5e918a7753645edfa033e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 5 Feb 1999 04:10:28 +0000 Subject: [PATCH] . original commit: 1ac5e36c98b2492e3d7fe315191a8c9418f506bb --- collects/tests/mred/draw-info.txt | 6 ++++++ collects/tests/mred/draw.ss | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/collects/tests/mred/draw-info.txt b/collects/tests/mred/draw-info.txt index 97e4e365..982bcb72 100644 --- a/collects/tests/mred/draw-info.txt +++ b/collects/tests/mred/draw-info.txt @@ -22,6 +22,12 @@ The drawing area should have the following features: form a squashed "S", twice as wide as high. The "S" is formed by two splines. + Under the splines should be two blue polygons, the top with a square + hole (odd-even fill) and the bottom all solid (winding fill). The + black lines forming the polygon should be the same in each shape + (strictly on borders for the top polygon, drawn over blue in the + bottom polygon). + To the far right should be three columns of boxes. All boxes should have a red border and lines on a background that matches the normal background (i.e., either white or cyan). The lines should diff --git a/collects/tests/mred/draw.ss b/collects/tests/mred/draw.ss index c6362ad2..46cbef2a 100644 --- a/collects/tests/mred/draw.ss +++ b/collects/tests/mred/draw.ss @@ -326,6 +326,27 @@ (send dc set-pen (make-object pen% "RED" 0 'solid)) (draw-ess -2 2) + ; Polygons: odd-even vs. winding + (let ([polygon + (list (make-object point% 12 0) + (make-object point% 40 0) + (make-object point% 40 28) + (make-object point% 0 28) + (make-object point% 0 12) + (make-object point% 28 12) + (make-object point% 28 40) + (make-object point% 12 40) + (make-object point% 12 0))] + [ob (send dc get-brush)] + [op (send dc get-pen)]) + (send dc set-pen pen1s) + (send dc set-brush (make-object brush% "BLUE" 'solid)) + (send dc draw-polygon polygon 200 40 'odd-even) + (send dc draw-polygon polygon 200 90 'winding) + (send dc set-pen op) + (send dc set-brush ob)) + + ; Brush patterns: (let ([pat-list (list 'bdiagonal-hatch 'crossdiag-hatch