From: Han-Wen Nienhuys Date: Thu, 12 Oct 2006 12:58:06 +0000 (+0000) Subject: * scm/framework-ps.scm (dump-stencil-as-EPS): fix thinkos. X-Git-Tag: release/2.10.0-2~191 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ab0d9d4f66ccb02968443b5cd3af2d1a880c55c8;p=lilypond.git * scm/framework-ps.scm (dump-stencil-as-EPS): fix thinkos. * scm/lily.scm (type-p-name-alist): add rhythmic-location? type name. * scm/lily.scm (define-scheme-options): add clip-systems option. * scm/framework-ps.scm (dump-stencil-as-EPS-with-bbox): new function (dump-stencil-as-EPS): move bbox calculation from previous dump-stencil-as-EPS (output-framework): use -dclip-systems * scm/framework-ps.scm (clip-system-EPS): new function. (clip-system-EPSes): new function. * scm/define-grob-properties.scm (all-user-grob-properties): add rhythmic-location property. --- diff --git a/ChangeLog b/ChangeLog index e9aba0fb54..df6663c954 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-10-12 Han-Wen Nienhuys + * scm/framework-ps.scm (dump-stencil-as-EPS): fix thinkos. + + * scm/lily.scm (type-p-name-alist): add rhythmic-location? type name. + * Documentation/topdocs/NEWS.tely (Top): doc new clipping feature * input/regression/clip-systems.ly (Notes): new file. diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 4edb3c336a..44f55aa52b 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -352,7 +352,7 @@ quicker the slur attains it @code{height-limit}.") (remove-empty ,boolean? "If set, remove group if it contains no @code{interesting-items}") (remove-first ,boolean? "Remove the first staff of a orchestral score?") - (rhythmic-location ,ly:moment? "Where (bar number, measure position) in the score.") + (rhythmic-location ,rhythmic-location? "Where (bar number, measure position) in the score.") (right-padding ,ly:dimension? "Space to insert on the right side of an object (eg. between note and its accidentals.)") (rotation ,list? "Number of degrees to rotate this object, and what point to rotate around. #'(45 0 0) means rotate 45 degrees around the center of this object.") diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 957ef0d2da..8cb0d3610b 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -488,6 +488,7 @@ (let* ((xext (ly:stencil-extent dump-me X)) (yext (ly:stencil-extent dump-me Y)) + (left-overshoot -3) (bbox (map (lambda (x) @@ -495,7 +496,7 @@ ;; FIXME: huh? (equal? (format #f "~S" x) "+#.#") (equal? (format #f "~S" x) "-#.#")) - 0.0 x)))) + 0.0 x)) ;; the left-overshoot is to make sure that ;; bar numbers stick out of margin uniformly. @@ -505,9 +506,10 @@ (if (ly:get-option 'pad-eps-boxes) (min left-overshoot (car xext)) (car xext)) - (car yext) (cdr xext) (cdr yext))) + (car yext) (cdr xext) (cdr yext))))) - (dump-stencil-as-EPS-with-bbox paper dump-me filename load-fonts bbox))) + (dump-stencil-as-EPS-with-bbox paper dump-me filename load-fonts bbox) + )) (define-public (dump-stencil-as-EPS-with-bbox paper dump-me filename @@ -535,7 +537,6 @@ (open-file (format "~a.eps" filename) "wb") "ps")) - (left-overshoot -3) (port (ly:outputter-port outputter)) diff --git a/scm/lily.scm b/scm/lily.scm index a36cd5eb84..b3fd34aa33 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -80,7 +80,10 @@ on errors, and print a stack trace.") (oop goops) (srfi srfi-1) (srfi srfi-13) - (srfi srfi-14)) + (srfi srfi-14) + (scm clip-region) + + ) ;; my display @@ -329,7 +332,8 @@ The syntax is the same as `define*-public'." (,number? . "number") (,output-port? . "output port") (,pair? . "pair") - (,procedure? . "procedure") + (,procedure? . "procedure") + (,rhythmic-location? . "rhythmic location") (,scheme? . "any type") (,string? . "string") (,symbol? . "symbol") @@ -449,7 +453,8 @@ The syntax is the same as `define*-public'." (lambda () (ly:parse-file file-name)) (lambda (x . args) (handler x file-name)))) -(use-modules (scm editor)) +(use-modules (scm editor) + ) (define-public (gui-main files) (if (null? files)