PR 10783
svn: r18340
This commit is contained in:
parent
2c408dbcdd
commit
39dd21c240
|
@ -185,7 +185,12 @@ module browser threading seems wrong.
|
||||||
(let ([kind (filename->kind fn)])
|
(let ([kind (filename->kind fn)])
|
||||||
(cond
|
(cond
|
||||||
[kind
|
[kind
|
||||||
|
(cond
|
||||||
|
[(or (is-a? snip image-snip%)
|
||||||
|
(is-a? snip cache-image-snip%))
|
||||||
(send (send snip get-bitmap) save-file fn kind)]
|
(send (send snip get-bitmap) save-file fn kind)]
|
||||||
|
[else
|
||||||
|
(image-core:save-image-as-bitmap snip fn kind)])]
|
||||||
[else
|
[else
|
||||||
(message-box
|
(message-box
|
||||||
(string-constant drscheme)
|
(string-constant drscheme)
|
||||||
|
|
|
@ -559,6 +559,17 @@ has been moved out).
|
||||||
(send dc set-text-foreground fg)
|
(send dc set-text-foreground fg)
|
||||||
(send dc set-smoothing smoothing)))
|
(send dc set-smoothing smoothing)))
|
||||||
|
|
||||||
|
(define (save-image-as-bitmap image filename kind)
|
||||||
|
(let* ([bb (send image get-bb)]
|
||||||
|
[bm (make-object bitmap%
|
||||||
|
(ceiling (inexact->exact (bb-right bb)))
|
||||||
|
(ceiling (inexact->exact (bb-bottom bb))))]
|
||||||
|
[bdc (make-object bitmap-dc% bm)])
|
||||||
|
(send bdc clear)
|
||||||
|
(render-image image bdc 0 0)
|
||||||
|
(send bdc set-bitmap #f)
|
||||||
|
(send bm save-file filename kind)))
|
||||||
|
|
||||||
(define (render-normalized-shape shape dc dx dy)
|
(define (render-normalized-shape shape dc dx dy)
|
||||||
(cond
|
(cond
|
||||||
[(overlay? shape)
|
[(overlay? shape)
|
||||||
|
@ -939,6 +950,7 @@ the mask bitmap and the original bitmap are all together in a single bytes!
|
||||||
|
|
||||||
text->font
|
text->font
|
||||||
render-image
|
render-image
|
||||||
|
save-image-as-bitmap
|
||||||
|
|
||||||
skip-image-equality-fast-path
|
skip-image-equality-fast-path
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user