fix contract on disk

(bug found by random testing)
This commit is contained in:
Robby Findler 2014-05-16 22:14:36 -05:00
parent 3f5ca73338
commit 67f215eec0
2 changed files with 5 additions and 3 deletions

View File

@ -288,7 +288,8 @@ override settings supplied by the context.
@defproc*[([(ellipse [w real?] [h real?]) pict?]
[(circle [diameter real?]) pict?]
[(filled-ellipse [w real?] [h real?] [#:draw-border? draw-border? any/c #t]) pict?]
[(disk [diameter real?] [#:draw-border? draw-border? any/c #t]) pict?])]{
[(disk [diameter (and/c rational? (not/c negative?))]
[#:draw-border? draw-border? any/c #t]) pict?])]{
Unfilled and filled ellipses.

View File

@ -9,7 +9,7 @@
pict->argb-pixels
argb-pixels->pict
colorize
pin-under pin-over)
pin-under pin-over disk)
(contract-out
[colorize (-> pict?
(or/c string?
@ -43,7 +43,8 @@
real?
(-> pict? pict? (values real? real?)))]
[pict pict?])
[result pict?])]))
[result pict?])]
[disk (->* ((and/c rational? (not/c negative?))) (#:draw-border? any/c) pict?)]))
(define (multiple-of-four-bytes? b)
(zero? (modulo (bytes-length b) 4)))