Slideshow/Scribble: fix size of PDF generated for pict in a doc

This commit is contained in:
Matthew Flatt 2011-02-15 13:16:27 -07:00
parent 3358b40377
commit 21c6a9f5c8

View File

@ -457,12 +457,15 @@
(send bm save-file s 'png) (send bm save-file s 'png)
(get-output-bytes s)))] (get-output-bytes s)))]
[(eps-bytes pdf-bytes) [(eps-bytes pdf-bytes)
(let ([s (open-output-bytes)]) (let ([s (open-output-bytes)]
[xs (box 1)]
[ys (box 1)])
(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 (eq? format 'eps-bytes) post-script-dc% pdf-dc%)
[interactive #f] [interactive #f]
[as-eps #t] [as-eps #t]
[width (pict-width p)] [width (* (pict-width p) (unbox xs))]
[height (pict-height p)] [height (* (pict-height p) (unbox ys))]
[output s])]) [output s])])
(send dc start-doc "pict") (send dc start-doc "pict")
(send dc start-page) (send dc start-page)