allow overlaying of 0x0 images

svn: r16558
This commit is contained in:
Robby Findler 2009-11-05 14:55:07 +00:00
parent 3290bb8e77
commit 693ba9b9e8
2 changed files with 4 additions and 1 deletions

View File

@ -247,7 +247,8 @@ plt/collects/tests/mzscheme/htdp-image.ss
(lambda (dc dx dy)
(a-f dc (+ dx a-dx) (+ dy a-dy))
(b-f dc (+ dx b-dx) (+ dy b-dy))))])
(check-sizes name new-w new-h)
(unless (and (<= 0 new-w 10000) (<= 0 new-h 10000))
(error name (format "cannot make ~a x ~a image" new-w new-h)))
(new cache-image-snip%
[dc-proc (combine (send a get-dc-proc)
(send b get-dc-proc))]

View File

@ -996,6 +996,8 @@
(test '() image->alpha-color-list (rectangle 10 0 'solid 'red))
(test '() image->alpha-color-list (rectangle 0 0 'solid 'red))
(test 0 image-width (overlay (circle 0 'solid 'red) (circle 0 'solid 'red)))
(test 0 image-height (overlay (circle 0 'solid 'red) (circle 0 'solid 'red)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;