From 2e538595214c8c70f863a43859faad5ff9b1ac31 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 1 Mar 2005 17:18:35 +0000 Subject: [PATCH] * scm/output-ps.scm (offset-add): Remove. * scm/lily-library.scm (offset-flip-y): New function. * scm/framework-gnome.scm (tweak): Use it. * scm/lily.scm (ly:all-stencil-expressions): Add url-link. * scm/output-ps.scm (url-link): Move. (white-text): Warn user about brokenness. --- ChangeLog | 5 +++++ scm/framework-gnome.scm | 10 +++++----- scm/lily-library.scm | 3 +++ scm/output-ps.scm | 4 ---- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c386c18b7..4982259011 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-03-01 Jan Nieuwenhuizen + * scm/output-ps.scm (offset-add): Remove. + + * scm/lily-library.scm (offset-flip-y): New function. + * scm/framework-gnome.scm (tweak): Use it. + * scm/output-gnome.scm (grob-cause): Add parameter. * scm/lily.scm (ly:all-stencil-expressions): Add url-link. diff --git a/scm/framework-gnome.scm b/scm/framework-gnome.scm index b22eb5cc95..17d95d8819 100644 --- a/scm/framework-gnome.scm +++ b/scm/framework-gnome.scm @@ -227,13 +227,13 @@ (let* ((grob (hashq-ref (item-grobs go) item #f)) (extra-offset (ly:grob-property grob 'extra-offset)) (origin (if (null? extra-offset) '(0 . 0) - (cons (car extra-offset) - (- 0 (cdr extra-offset)))))) + (offset-flip-y extra-offset)))) (if grob - (ly:insert-tweak grob (list tweak-grob-property - 'extra-offset - (offset-add origin offset)))))) + (ly:insert-tweak + grob (list tweak-grob-property + 'extra-offset + (offset-flip-y (offset-add origin offset))))))) (define-method (save-tweaks (go )) (let* ((dumper (ly:make-dumper)) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index c8789d199e..85bf5db019 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -232,6 +232,9 @@ found." (cons (+ (car a) (car b)) (+ (cdr a) (cdr b)))) +(define-public (offset-flip-y o) + (cons (car o) (- (cdr o)))) + (define-public (ly:list->offsets accum coords) (if (null? coords) accum diff --git a/scm/output-ps.scm b/scm/output-ps.scm index b96b6a0398..b8a4a9bf71 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -68,10 +68,6 @@ (define (escape-parentheses s) (regexp-substitute/global #f "(^|[^\\])([\\(\\)])" s 'pre 1 "\\" 2 'post)) -(define (offset-add a b) - (cons (+ (car a) (car b)) - (+ (cdr a) (cdr b)))) - (define (ps-encoding text) (escape-parentheses text)) -- 2.39.5