[plt-scheme] Re : interaction bug of draw-bitmap set-scale and get-loaded-mask

From: stephane bonnet (stefanbonnet at yahoo.fr)
Date: Sat Jan 9 13:58:26 EST 2010

well, just to make sure it's not something I totally missed :

(define image (make-object bitmap% (string->path "image-path-string") 'png/mask))
(define mask (make-object bitmap% (send image get-width) (send image get-height)))

(define mask-dc (instantiate bitmap-dc% (mask)))
(send mask-dc set-background white)
(send mask-dc clear)
(send mask-dc draw-bitmap (send image get-loaded-mask) 0 0)

(send dc set-scale 0.5 0.5)
(send dc set-background grey)
(send dc clear)

(send dc draw-bitmap image 0 0 'solid black (send image get-loaded-mask)) ;doesn't work
(send dc draw-bitmap image 0 0 'solid black mask) ;works fine

Posted on the users mailing list.