+2005-01-31 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/framework-ps.scm (dump-stencil-as-EPS): robustness: ensure
+ that both X and Y extents of bbox are non-nil.
+
2005-01-30 Han-Wen Nienhuys <hanwen@xs4all.nl>
* scm/chord-name.scm (alteration->text-accidental-markup): change
/init-paper {
gsave
- .1 setlinewidth
clippath pathbbox newpath
/vsize exch def
/hsize exch def pop pop pop
/init-lilypond-parameters {
staff-line-thickness setlinewidth
staff-height init-paper
- pstack
} bind def
(for-each (lambda (c)
(display (format "\\includegraphics{~a-~a.eps}%\n"
basename (1+ c)) tex-system-port)
- (display (format "@image{~a-~a}%\n"
+ (display (format "@image{~a-~a}@c\n"
basename (1+ c)) texi-system-port))
(iota (length stencils)))
(define-public (dump-stencil-as-EPS paper dump-me filename load-fonts?)
+ (define (mm-to-bp-box mmbox)
+ (let*
+ ((scale (ly:output-def-lookup paper 'outputscale))
+ (box (map
+ (lambda (x)
+ (inexact->exact
+ (round (* x scale mm-to-bigpoint)))) mmbox)))
+
+ (list (car box) (cadr box)
+ (max (1+ (car box)) (caddr box))
+ (max (1+ (cadr box)) (cadddr box)))))
+
(let*
((outputter (ly:make-paper-outputter (format "~a.eps" filename)
"ps"))
(port (ly:outputter-port outputter))
(xext (ly:stencil-extent dump-me X))
(yext (ly:stencil-extent dump-me Y))
- (scale (ly:output-def-lookup paper 'outputscale))
+
(bbox
(map
(lambda (x)
0.0 x))
(list (car xext) (car yext)
(cdr xext) (cdr yext))))
- (rounded-bbox
- (map
- (lambda (x)
- (inexact->exact
- (round (* x scale mm-to-bigpoint)))) bbox))
+ (rounded-bbox (mm-to-bp-box bbox))
(port (ly:outputter-port outputter))
(header (eps-header paper rounded-bbox load-fonts?)))