fix PS/PDF size
since a PS/PDF bounding box is an integer, take the ceiling of a requested width & height
This commit is contained in:
parent
4021f55c61
commit
67b7c8f3f4
|
@ -70,12 +70,14 @@
|
|||
(not fn))
|
||||
(values #f #f #f #f #f #f #f)
|
||||
(let* ([paper (assoc (send pss get-paper-name) paper-sizes)]
|
||||
[w (if (or (not init-w) use-paper-bbox)
|
||||
(cadr paper)
|
||||
init-w)]
|
||||
[h (if (or (not init-h) use-paper-bbox)
|
||||
(caddr paper)
|
||||
init-h)]
|
||||
[w (ceiling
|
||||
(if (or (not init-w) use-paper-bbox)
|
||||
(cadr paper)
|
||||
init-w))]
|
||||
[h (ceiling
|
||||
(if (or (not init-h) use-paper-bbox)
|
||||
(caddr paper)
|
||||
init-h))]
|
||||
[landscape? (eq? (send pss get-orientation) 'landscape)]
|
||||
[file (if (output-port? fn)
|
||||
fn
|
||||
|
@ -182,6 +184,7 @@
|
|||
(define/override (can-mask-bitmap?)
|
||||
#f)
|
||||
|
||||
(define/override (dc-adjust-cap-shape shape sx pw) shape)
|
||||
(define/override (get-hairline-width cx) (/ 1.0 (* cx 4)))
|
||||
|
||||
(define is-eps? (and as-eps #t))
|
||||
|
|
|
@ -39,7 +39,8 @@ If @scheme[interactive] is @scheme[#f], then the settings returned by
|
|||
|
||||
If @scheme[use-paper-bbox] is @scheme[#f], then the PostScript
|
||||
bounding box for the output is determined by @racket[width] and
|
||||
@racket[height]. If @scheme[use-paper-bbox] is not @scheme[#f], then
|
||||
@racket[height] (which are rounded upward using @racket[ceiling]).
|
||||
If @scheme[use-paper-bbox] is not @scheme[#f], then
|
||||
the bounding box is determined by the current paper size (as
|
||||
specified by @scheme[current-ps-setup]). When @racket[width] or
|
||||
@racket[height] is @racket[#f], then the corresponding dimension is
|
||||
|
|
Loading…
Reference in New Issue
Block a user