From 7c25320debe94e3e8c6aaabfad3bd88e3f98ebe2 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sun, 3 Sep 2006 04:03:06 +0000 Subject: [PATCH] fixed bug in image library svn: r4230 original commit: bc388368a777f14ed0a21f50dd2cb36606a6dbd9 --- collects/mrlib/cache-image-snip.ss | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/collects/mrlib/cache-image-snip.ss b/collects/mrlib/cache-image-snip.ss index 81977950..ffcbf496 100644 --- a/collects/mrlib/cache-image-snip.ss +++ b/collects/mrlib/cache-image-snip.ss @@ -147,7 +147,9 @@ void (lambda (x) #f))]) (if data - (argb->cache-image-snip (make-argb (first data) (second data)) (third data) (fourth data)) + (argb->cache-image-snip (make-argb (first data) (second data)) + (third data) + (fourth data)) (make-null-cache-image-snip)))) (super-new))) @@ -634,9 +636,16 @@ for b3, we have: (* -255 m3)) (- 255 m3)))) + (define bitmap-size/c (and/c integer? exact? (between/c 1 10000))) + (provide/contract - [overlay-bitmap (argb? number? number? (is-a?/c bitmap%) (is-a?/c bitmap%) . -> . any)] - [build-bitmap (((is-a?/c dc<%>) . -> . any) number? number? . -> . (is-a?/c bitmap%))] + [overlay-bitmap (argb? (and/c integer? exact?) + (and/c integer? exact?) + (is-a?/c bitmap%) + (is-a?/c bitmap%) + . -> . + any)] + [build-bitmap (((is-a?/c dc<%>) . -> . any) bitmap-size/c bitmap-size/c . -> . (is-a?/c bitmap%))] [flatten-bitmap ((is-a?/c bitmap%) . -> . (is-a?/c bitmap%))] [argb->cache-image-snip (argb? number? number? . -> . (is-a?/c cache-image-snip%))]