From edfdb1371b6d9cd79abe23fb08993a2b7a0c6915 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 2 Dec 2009 05:08:04 +0000 Subject: [PATCH] PR 10633 svn: r17159 original commit: 57f9a7063e24cdae76bb7eb749453ed8f77f6713 --- collects/mrlib/image-core.ss | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/mrlib/image-core.ss b/collects/mrlib/image-core.ss index 875bc9a7..d216c6df 100644 --- a/collects/mrlib/image-core.ss +++ b/collects/mrlib/image-core.ss @@ -629,18 +629,20 @@ the mask bitmap and the original bitmap are all together in a single bytes! [scale-w (ceiling (inexact->exact (* x-scale (send orig-bm get-width))))] [scale-h (ceiling (inexact->exact (* y-scale (send orig-bm get-height))))] [new-bm (make-object bitmap% scale-w scale-h)] - [new-mask (make-object bitmap% scale-w scale-h)]) - (send new-bm set-loaded-mask new-mask) + [new-mask (and orig-mask (make-object bitmap% scale-w scale-h))]) + (when new-mask + (send new-bm set-loaded-mask new-mask)) (send bdc set-bitmap new-bm) (send bdc set-scale x-scale y-scale) (send bdc clear) (send bdc draw-bitmap orig-bm 0 0) - (send bdc set-bitmap new-mask) - (send bdc set-scale x-scale y-scale) - (send bdc clear) - (send bdc draw-bitmap orig-mask 0 0) + (when new-mask + (send bdc set-bitmap new-mask) + (send bdc set-scale x-scale y-scale) + (send bdc clear) + (send bdc draw-bitmap orig-mask 0 0)) (send bdc set-bitmap #f)