.
original commit: 1ac5e36c98b2492e3d7fe315191a8c9418f506bb
This commit is contained in:
parent
8e8e3f0357
commit
36d892a66f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user