LEFT | RIGHT |
1 ;;;; output-lib.scm -- implement Scheme output helper functions | 1 ;;;; output-lib.scm -- implement Scheme output helper functions |
2 ;;;; | 2 ;;;; |
3 ;;;; source file of the GNU LilyPond music typesetter | 3 ;;;; source file of the GNU LilyPond music typesetter |
4 ;;;; | 4 ;;;; |
5 ;;;; (c) 1998--2009 Jan Nieuwenhuizen <janneke@gnu.org> | 5 ;;;; (c) 1998--2009 Jan Nieuwenhuizen <janneke@gnu.org> |
6 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> | 6 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> |
7 | 7 |
8 | 8 |
9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
10 ;; general | 10 ;; general |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 811 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
812 ;; grid lines | 812 ;; grid lines |
813 | 813 |
814 (define-public (grid-line-interface::print grob) | 814 (define-public (grid-line-interface::print grob) |
815 (let ((elts (ly:grob-object grob 'elements))) | 815 (let ((elts (ly:grob-object grob 'elements))) |
816 | 816 |
817 (if (ly:grob-array? elts) | 817 (if (ly:grob-array? elts) |
818 (let ((common (ly:grob-common-refpoint-of-array grob elts Y)) | 818 (let ((common (ly:grob-common-refpoint-of-array grob elts Y)) |
819 (iv empty-interval)) | 819 (iv empty-interval)) |
820 | 820 |
821 (for-each (lambda (idx) | 821 » (for-each (lambda (idx) |
822 (let ((point (ly:grob-array-ref elts idx))) | 822 » » (let ((point (ly:grob-array-ref elts idx))) |
823 (set! iv | 823 » » » (set! iv |
824 (interval-union | 824 » » » (interval-union |
825 iv (ly:grob-extent point common Y))))) | 825 » » » iv (ly:grob-extent point common Y))))) |
826 (iota (ly:grob-array-length elts))) | 826 » » (iota (ly:grob-array-length elts))) |
827 | 827 |
828 (if (interval-sane? iv) | 828 (if (interval-sane? iv) |
829 (let ((thick (grob::scaled-thickness grob))) | 829 (let ((thick (grob::scaled-thickness grob))) |
830 | 830 |
831 (set! iv (interval-translate | 831 (set! iv (interval-translate |
832 iv (- (ly:grob-relative-coordinate grob common Y)))) | 832 iv (- (ly:grob-relative-coordinate grob common Y)))) |
833 | 833 |
834 (ly:round-filled-box (cons 0 thick) iv 0)) | 834 (ly:round-filled-box (cons 0 thick) iv 0)) |
835 empty-stencil)) | 835 empty-stencil)) |
836 (begin | 836 (begin |
837 (ly:grob-suicide! grob) | 837 (ly:grob-suicide! grob) |
838 '())))) | 838 '())))) |
839 | 839 |
840 (define-public (grid-line-interface::width grob) | 840 (define-public (grid-line-interface::width grob) |
841 (cons 0 (grob::scaled-thickness grob))) | 841 (cons 0 (grob::scaled-thickness grob))) |
LEFT | RIGHT |