closes PR 11236
This commit is contained in:
parent
8499a4e65d
commit
08b9396e2f
|
@ -773,7 +773,7 @@
|
||||||
#t)
|
#t)
|
||||||
|
|
||||||
(test (equal~? (rectangle 100 10 'solid 'red)
|
(test (equal~? (rectangle 100 10 'solid 'red)
|
||||||
(rotate 90 (rectangle 10.001 100.0001 'solid 'red))
|
(rotate 90 (rectangle 10.0001 100.0001 'solid 'red))
|
||||||
0.1)
|
0.1)
|
||||||
=>
|
=>
|
||||||
#t)
|
#t)
|
||||||
|
@ -1578,6 +1578,18 @@
|
||||||
(rectangle 1 1 'solid (color 5 5 5))
|
(rectangle 1 1 'solid (color 5 5 5))
|
||||||
(rectangle 1 1 'solid (color 6 6 6)))))
|
(rectangle 1 1 'solid (color 6 6 6)))))
|
||||||
|
|
||||||
|
(let ([has-color?
|
||||||
|
(λ (img)
|
||||||
|
(ormap (λ (x) (or (not (equal? (color-red x)
|
||||||
|
(color-green x)))
|
||||||
|
(not (equal? (color-red x)
|
||||||
|
(color-blue x)))))
|
||||||
|
(image->color-list img)))])
|
||||||
|
(test (has-color? (place-image (rectangle 1 10 "solid" "red") 2 10
|
||||||
|
(empty-scene 5 20)))
|
||||||
|
=>
|
||||||
|
#t))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;
|
;;
|
||||||
;; test pinholes.
|
;; test pinholes.
|
||||||
|
|
|
@ -774,12 +774,12 @@ has been moved out).
|
||||||
|
|
||||||
(define (polygon-points->path points)
|
(define (polygon-points->path points)
|
||||||
(let ([path (new dc-path%)])
|
(let ([path (new dc-path%)])
|
||||||
(send path move-to (round (point-x (car points))) (round (point-y (car points))))
|
(send path move-to (point-x (car points)) (point-y (car points)))
|
||||||
(let loop ([points (cdr points)])
|
(let loop ([points (cdr points)])
|
||||||
(unless (null? points)
|
(unless (null? points)
|
||||||
(send path line-to
|
(send path line-to
|
||||||
(round (point-x (car points)))
|
(point-x (car points))
|
||||||
(round (point-y (car points))))
|
(point-y (car points)))
|
||||||
(loop (cdr points))))
|
(loop (cdr points))))
|
||||||
(send path close)
|
(send path close)
|
||||||
;(send path line-to (round (point-x (car points))) (round (point-y (car points))))
|
;(send path line-to (round (point-x (car points))) (round (point-y (car points))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user