improve the bitmap function in 2htdp/image
related to PR 11362
This commit is contained in:
parent
903d7c06bb
commit
0dc71e9405
|
@ -67,9 +67,8 @@
|
|||
filename
|
||||
[width (if (image? image) (image-width image) 0)]
|
||||
[height (if (image? image) (image-height image) 0)])
|
||||
(let* ([bm (make-object bitmap%
|
||||
(inexact->exact (ceiling width))
|
||||
(inexact->exact (ceiling height)))]
|
||||
(let* ([bm (make-bitmap (inexact->exact (ceiling width))
|
||||
(inexact->exact (ceiling height)))]
|
||||
[bdc (make-object bitmap-dc% bm)])
|
||||
(send bdc set-smoothing 'aligned)
|
||||
(send bdc erase)
|
||||
|
@ -77,7 +76,6 @@
|
|||
(send bdc set-bitmap #f)
|
||||
(send bm save-file filename 'png)))
|
||||
|
||||
|
||||
(define (get-right img) (bb-right (send img get-bb)))
|
||||
(define (get-bottom img) (bb-bottom (send img get-bb)))
|
||||
(define (get-baseline img) (bb-baseline (send img get-bb)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user