svn: r17159
This commit is contained in:
Robby Findler 2009-12-02 05:08:04 +00:00
parent b310c35a38
commit 57f9a7063e
2 changed files with 13 additions and 7 deletions

View File

@ -972,4 +972,8 @@
#"\0\0\0\0" #"\377\0\0\0" #"\0\0\0\0" #"\0\0\0\0"
#"\0\0\0\0" #"\0\0\0\0" #"\0\0\0\0" #"\0\0\0\0"
#"\0\0\0\0" #"\0\0\0\0" #"\0\0\0\0" #"\0\0\0\0"))
;; ensure no error
(check-equal? (begin (scale 2 (make-object bitmap% 10 10))
(void))
(void))

View File

@ -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)