support eps-bytes+bounds for picts

This commit is contained in:
Robby Findler 2014-06-27 03:24:48 -05:00
parent 0179c9a9a5
commit 6dc0c40e24

View File

@ -540,16 +540,22 @@
(define (convert-pict p format default) (define (convert-pict p format default)
(if (eq? format 'pdf-bytes+bounds) (cond
(let ([xscale (box 1.0)] [(member format '(pdf-bytes+bounds eps-bytes+bounds))
[yscale (box 1.0)]) (define xscale (box 1.0))
(define yscale (box 1.0))
(send (current-ps-setup) get-scaling xscale yscale) (send (current-ps-setup) get-scaling xscale yscale)
(list (convert-pict/bytes p 'pdf-bytes default) (list (convert-pict/bytes p
(if (equal? format 'pdf-bytes+bounds)
'pdf-bytes
'eps-bytes)
default)
(* (unbox xscale) (pict-width p)) (* (unbox xscale) (pict-width p))
(* (unbox yscale) (pict-height p)) (* (unbox yscale) (pict-height p))
(* (unbox yscale) (pict-descent p)) (* (unbox yscale) (pict-descent p))
0)) 0)]
(convert-pict/bytes p format default))) [else
(convert-pict/bytes p format default)]))
(define (convert-pict/bytes p format default) (define (convert-pict/bytes p format default)
(case format (case format
@ -570,7 +576,7 @@
[xs (box 1)] [xs (box 1)]
[ys (box 1)]) [ys (box 1)])
(send (current-ps-setup) get-scaling xs ys) (send (current-ps-setup) get-scaling xs ys)
(let ([dc (new (if (eq? format 'eps-bytes) post-script-dc% pdf-dc%) (let ([dc (new (if (equal? format 'eps-bytes) post-script-dc% pdf-dc%)
[interactive #f] [interactive #f]
[as-eps #t] [as-eps #t]
[width (* (pict-width p) (unbox xs))] [width (* (pict-width p) (unbox xs))]