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))
|
(not fn))
|
||||||
(values #f #f #f #f #f #f #f)
|
(values #f #f #f #f #f #f #f)
|
||||||
(let* ([paper (assoc (send pss get-paper-name) paper-sizes)]
|
(let* ([paper (assoc (send pss get-paper-name) paper-sizes)]
|
||||||
[w (if (or (not init-w) use-paper-bbox)
|
[w (ceiling
|
||||||
|
(if (or (not init-w) use-paper-bbox)
|
||||||
(cadr paper)
|
(cadr paper)
|
||||||
init-w)]
|
init-w))]
|
||||||
[h (if (or (not init-h) use-paper-bbox)
|
[h (ceiling
|
||||||
|
(if (or (not init-h) use-paper-bbox)
|
||||||
(caddr paper)
|
(caddr paper)
|
||||||
init-h)]
|
init-h))]
|
||||||
[landscape? (eq? (send pss get-orientation) 'landscape)]
|
[landscape? (eq? (send pss get-orientation) 'landscape)]
|
||||||
[file (if (output-port? fn)
|
[file (if (output-port? fn)
|
||||||
fn
|
fn
|
||||||
|
@ -182,6 +184,7 @@
|
||||||
(define/override (can-mask-bitmap?)
|
(define/override (can-mask-bitmap?)
|
||||||
#f)
|
#f)
|
||||||
|
|
||||||
|
(define/override (dc-adjust-cap-shape shape sx pw) shape)
|
||||||
(define/override (get-hairline-width cx) (/ 1.0 (* cx 4)))
|
(define/override (get-hairline-width cx) (/ 1.0 (* cx 4)))
|
||||||
|
|
||||||
(define is-eps? (and as-eps #t))
|
(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
|
If @scheme[use-paper-bbox] is @scheme[#f], then the PostScript
|
||||||
bounding box for the output is determined by @racket[width] and
|
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
|
the bounding box is determined by the current paper size (as
|
||||||
specified by @scheme[current-ps-setup]). When @racket[width] or
|
specified by @scheme[current-ps-setup]). When @racket[width] or
|
||||||
@racket[height] is @racket[#f], then the corresponding dimension is
|
@racket[height] is @racket[#f], then the corresponding dimension is
|
||||||
|
|
Loading…
Reference in New Issue
Block a user