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