LEFT | RIGHT |
(no file at all) | |
1 ;;;; This file is part of LilyPond, the GNU music typesetter. | 1 ;;;; This file is part of LilyPond, the GNU music typesetter. |
2 ;;;; | 2 ;;;; |
3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> | 3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> |
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
5 ;;;; | 5 ;;;; |
6 ;;;; LilyPond is free software: you can redistribute it and/or modify | 6 ;;;; LilyPond is free software: you can redistribute it and/or modify |
7 ;;;; it under the terms of the GNU General Public License as published by | 7 ;;;; it under the terms of the GNU General Public License as published by |
8 ;;;; the Free Software Foundation, either version 3 of the License, or | 8 ;;;; the Free Software Foundation, either version 3 of the License, or |
9 ;;;; (at your option) any later version. | 9 ;;;; (at your option) any later version. |
10 ;;;; | 10 ;;;; |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 ly:slur::height | 1118 ly:slur::height |
1119 ly:slur::pure-height)) | 1119 ly:slur::pure-height)) |
1120 | 1120 |
1121 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1121 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1122 ;; scripts | 1122 ;; scripts |
1123 | 1123 |
1124 (define-public (script-interface::calc-x-offset grob) | 1124 (define-public (script-interface::calc-x-offset grob) |
1125 (ly:grob-property grob 'positioning-done) | 1125 (ly:grob-property grob 'positioning-done) |
1126 (let* ((shift (ly:grob-property grob 'toward-stem-shift 0.0)) | 1126 (let* ((shift (ly:grob-property grob 'toward-stem-shift 0.0)) |
1127 (note-head-location | 1127 (note-head-location |
1128 » (ly:self-alignment-interface::centered-on-x-parent grob)) | 1128 » (ly:self-alignment-interface::x-align-grob grob)) |
1129 (note-head-grob (ly:grob-parent grob X)) | 1129 (note-head-grob (ly:grob-parent grob X)) |
1130 (stem-grob (ly:grob-object note-head-grob 'stem))) | 1130 (stem-grob (ly:grob-object note-head-grob 'stem))) |
1131 | 1131 |
1132 (+ note-head-location | 1132 (+ note-head-location |
1133 ;; If the property 'toward-stem-shift is defined and the script | 1133 ;; If the property 'toward-stem-shift is defined and the script |
1134 ;; has the same direction as the stem, move the script accordingly. | 1134 ;; has the same direction as the stem, move the script accordingly. |
1135 ;; Since scripts can also be over skips, we need to check whether | 1135 ;; Since scripts can also be over skips, we need to check whether |
1136 ;; the grob has a stem at all. | 1136 ;; the grob has a stem at all. |
1137 (if (ly:grob? stem-grob) | 1137 (if (ly:grob? stem-grob) |
1138 (let ((dir1 (ly:grob-property grob 'direction)) | 1138 (let ((dir1 (ly:grob-property grob 'direction)) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 (equal? (ly:spanner-bound axis-group LEFT) | 1222 (equal? (ly:spanner-bound axis-group LEFT) |
1223 left-bound)) | 1223 left-bound)) |
1224 (set! extent (add-point extent | 1224 (set! extent (add-point extent |
1225 (ly:grob-relative-coordinate | 1225 (ly:grob-relative-coordinate |
1226 axis-group system Y)))) | 1226 axis-group system Y)))) |
1227 (get-extent (cdr lst))))) | 1227 (get-extent (cdr lst))))) |
1228 ;; no live axis group(s) for this instrument name -> remove from system | 1228 ;; no live axis group(s) for this instrument name -> remove from system |
1229 (ly:grob-suicide! grob)) | 1229 (ly:grob-suicide! grob)) |
1230 | 1230 |
1231 (+ | 1231 (+ |
1232 (ly:self-alignment-interface::y-aligned-on-self grob) | 1232 (ly:self-alignment-interface::y-align-grob grob) |
1233 (interval-center extent)))) | 1233 (interval-center extent)))) |
1234 | 1234 |
1235 | 1235 |
1236 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1236 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1237 ;; axis group interface | 1237 ;; axis group interface |
1238 | 1238 |
1239 (define-public axis-group-interface::height | 1239 (define-public axis-group-interface::height |
1240 (ly:make-unpure-pure-container | 1240 (ly:make-unpure-pure-container |
1241 ly:axis-group-interface::height | 1241 ly:axis-group-interface::height |
1242 ly:axis-group-interface::pure-height)) | 1242 ly:axis-group-interface::pure-height)) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1286 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1287 ;; volta-bracket | 1287 ;; volta-bracket |
1288 | 1288 |
1289 (define-public (volta-bracket-interface::pure-height grob start end) | 1289 (define-public (volta-bracket-interface::pure-height grob start end) |
1290 (let ((edge-height (ly:grob-property grob 'edge-height))) | 1290 (let ((edge-height (ly:grob-property grob 'edge-height))) |
1291 (if (number-pair? edge-height) | 1291 (if (number-pair? edge-height) |
1292 (let ((smaller (min (car edge-height) (cdr edge-height))) | 1292 (let ((smaller (min (car edge-height) (cdr edge-height))) |
1293 (larger (max (car edge-height) (cdr edge-height)))) | 1293 (larger (max (car edge-height) (cdr edge-height)))) |
1294 (interval-union '(0 . 0) (cons smaller larger))) | 1294 (interval-union '(0 . 0) (cons smaller larger))) |
1295 '(0 . 0)))) | 1295 '(0 . 0)))) |
LEFT | RIGHT |