fix draw-polygon' on pairs instead of
point%'s
Closes PR 12455
This commit is contained in:
parent
5cd324af15
commit
5bfaea25fe
|
@ -24,7 +24,9 @@
|
|||
(define black (send the-color-database find-color "black"))
|
||||
|
||||
(define (clone-point p)
|
||||
(make-object point% (point-x p) (point-y p)))
|
||||
(if (pair? p)
|
||||
p
|
||||
(make-object point% (point-x p) (point-y p))))
|
||||
|
||||
(define (clone-color c)
|
||||
(if (string? c)
|
||||
|
|
|
@ -65,11 +65,12 @@
|
|||
(send f show #t)))
|
||||
|
||||
(define star
|
||||
(list (make-object point% 30 0)
|
||||
(make-object point% 48 60)
|
||||
(make-object point% 0 20)
|
||||
(make-object point% 60 20)
|
||||
(make-object point% 12 60)))
|
||||
;; uses pairs instead of point%s
|
||||
(list (cons 30 0)
|
||||
(cons 48 60)
|
||||
(cons 0 20)
|
||||
(cons 60 20)
|
||||
(cons 12 60)))
|
||||
|
||||
(define octagon
|
||||
(list (make-object point% 60 60)
|
||||
|
|
Loading…
Reference in New Issue
Block a user