adjust the size calculation of picts in the file/convertible connection to take into account the current-ps-setup's scale

original commit: 28be0c6e8938426668937add84c53647790aa736
This commit is contained in:
Robby Findler 2011-03-15 08:52:22 -05:00
parent 436582c382
commit 180aa8f478

View File

@ -10,7 +10,8 @@
scheme/string scheme/string
scheme/list scheme/list
setup/main-collects setup/main-collects
file/convertible) file/convertible
racket/draw)
(provide render-mixin) (provide render-mixin)
(define current-table-mode (make-parameter #f)) (define current-table-mode (make-parameter #f))
@ -249,12 +250,11 @@
(image-element-scale e) fn))] (image-element-scale e) fn))]
[(and (convertible? e) [(and (convertible? e)
(not (disable-images)) (not (disable-images))
(let ([ftag (lambda (v suffix) (and v (list v suffix)))] (let ([ftag (lambda (v suffix) (and v (list v suffix)))])
[xlist (lambda (v) (and v (list v #f #f #f #f)))])
(or (ftag (convert e 'pdf-bytes+bounds) ".pdf") (or (ftag (convert e 'pdf-bytes+bounds) ".pdf")
(ftag (xlist (convert e 'pdf-bytes)) ".pdf") (ftag (list (convert e 'pdf-bytes) #f #f #f #f) ".pdf")
(ftag (xlist (convert e 'eps-bytes)) ".ps") (ftag (list (convert e 'eps-bytes) #f #f #f #f) ".ps")
(ftag (xlist (convert e 'png-bytes)) ".png")))) (ftag (list (convert e 'png-bytes) #f #f #f #f) ".png"))))
=> (lambda (bstr+info+suffix) => (lambda (bstr+info+suffix)
(let* ([bstr (list-ref (list-ref bstr+info+suffix 0) 0)] (let* ([bstr (list-ref (list-ref bstr+info+suffix 0) 0)]
[suffix (list-ref bstr+info+suffix 1)] [suffix (list-ref bstr+info+suffix 1)]