From 01bb6b8b6186e22500a59201135f25377c3d2c9e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 13 Nov 2009 00:57:31 +0000 Subject: [PATCH] fixed a bug in bitmap handling svn: r16738 --- collects/2htdp/private/image-more.ss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/collects/2htdp/private/image-more.ss b/collects/2htdp/private/image-more.ss index 11d951eb16..1f62dd7da2 100644 --- a/collects/2htdp/private/image-more.ss +++ b/collects/2htdp/private/image-more.ss @@ -248,11 +248,14 @@ (1 . <= . i))) (define (bitmap->image bm [mask-bm (send bm get-loaded-mask)]) - (make-image (make-bitmap bm mask-bm 0 1 #f) - (make-bb (send bm get-width) - (send bm get-height) - (send bm get-height)) - #f)) + (let ([w (send bm get-width)] + [h (send bm get-height)]) + (make-image (make-translate + (/ w 2) + (/ h 2) + (make-bitmap bm mask-bm 0 1 #f)) + (make-bb w h h) + #f))) (define (image-snip->image is) (bitmap->image (send is get-bitmap)