adjust the size calculation of picts in the file/convertible connection to take into account the current-ps-setup's scale
This commit is contained in:
parent
e8cb27c08c
commit
28be0c6e89
|
@ -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)]
|
||||
|
|
|
@ -448,11 +448,14 @@
|
|||
|
||||
(define (convert-pict p format default)
|
||||
(if (eq? format 'pdf-bytes+bounds)
|
||||
(list (convert-pict/bytes p 'pdf-bytes default)
|
||||
(pict-width p)
|
||||
(pict-height p)
|
||||
(pict-descent p)
|
||||
0)
|
||||
(let ([xscale (box 1.0)]
|
||||
[yscale (box 1.0)])
|
||||
(send (current-ps-setup) get-scaling xscale yscale)
|
||||
(list (convert-pict/bytes p 'pdf-bytes default)
|
||||
(* (unbox xscale) (pict-width p))
|
||||
(* (unbox yscale) (pict-height p))
|
||||
(* (unbox yscale) (pict-descent p))
|
||||
0))
|
||||
(convert-pict/bytes p format default)))
|
||||
|
||||
(define (convert-pict/bytes p format default)
|
||||
|
|
Loading…
Reference in New Issue
Block a user