Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(772)

Delta Between Two Patch Sets: scm/define-grobs.scm

Issue 6498077: Approximates cross-staff slurs in VerticalAxisGroup vertical-skylines. Base URL: http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Left Patch Set: Moves cross-staff skyline logic to page-layout-problem.cc Created 12 years, 7 months ago
Right Patch Set: Better approximations Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 Han-Wen Nienhuys <hanwen@xs4all.nl> 3 ;;;; Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;; Jan Nieuwenhuizen <janneke@gnu.org> 4 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
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 15 matching lines...) Expand all
26 26
27 (define-public all-grob-descriptions 27 (define-public all-grob-descriptions
28 `( 28 `(
29 (Accidental 29 (Accidental
30 . ( 30 . (
31 (alteration . ,accidental-interface::calc-alteration) 31 (alteration . ,accidental-interface::calc-alteration)
32 (avoid-slur . inside) 32 (avoid-slur . inside)
33 (glyph-name . ,accidental-interface::glyph-name) 33 (glyph-name . ,accidental-interface::glyph-name)
34 (glyph-name-alist . ,standard-alteration-glyph-name-alist) 34 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
35 (stencil . ,ly:accidental-interface::print) 35 (stencil . ,ly:accidental-interface::print)
36 (horizontal-skylines . ,ly:accidental-interface::horizontal-skylines)
36 (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil) 37 (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
37 (X-extent . ,ly:accidental-interface::width) 38 (X-extent . ,ly:accidental-interface::width)
38 (Y-extent . ,ly:accidental-interface::height) 39 (Y-extent . ,ly:accidental-interface::height)
39 (meta . ((class . Item) 40 (meta . ((class . Item)
40 (interfaces . (accidental-interface 41 (interfaces . (accidental-interface
41 inline-accidental-interface 42 inline-accidental-interface
42 font-interface)))))) 43 font-interface))))))
43 44
44 (AccidentalCautionary 45 (AccidentalCautionary
45 . ( 46 . (
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 text-interface)))))) 278 text-interface))))))
278 279
279 (BassFigureAlignment 280 (BassFigureAlignment
280 . ( 281 . (
281 (axes . (,Y)) 282 (axes . (,Y))
282 (padding . 0.2) 283 (padding . 0.2)
283 (positioning-done . ,ly:align-interface::align-to-minimum-distances) 284 (positioning-done . ,ly:align-interface::align-to-minimum-distances)
284 (stacking-dir . ,DOWN) 285 (stacking-dir . ,DOWN)
285 (Y-extent . ,ly:axis-group-interface::height) 286 (Y-extent . ,ly:axis-group-interface::height)
286 (meta . ((class . Spanner) 287 (meta . ((class . Spanner)
287 » » (object-callbacks . ((full-score-pure-minimum-translations . ,l y:align-interface::full-score-pure-minimum-translations) 288 » » (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common)
288 » » » » (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common)
289 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs))) 289 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs)))
290 (interfaces . (align-interface 290 (interfaces . (align-interface
291 axis-group-interface 291 axis-group-interface
292 bass-figure-alignment-interface)))))) 292 bass-figure-alignment-interface))))))
293 293
294 (BassFigureAlignmentPositioning 294 (BassFigureAlignmentPositioning
295 . ( 295 . (
296 (axes . (,Y)) 296 (axes . (,Y))
297 (direction . ,UP) 297 (direction . ,UP)
298 (padding . 0.5) 298 (padding . 0.5)
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 (meta . ((class . Item) 1200 (meta . ((class . Item)
1201 (interfaces . (semi-tie-column-interface)))))) 1201 (interfaces . (semi-tie-column-interface))))))
1202 1202
1203 (LedgerLineSpanner 1203 (LedgerLineSpanner
1204 . ( 1204 . (
1205 (layer . 0) 1205 (layer . 0)
1206 (length-fraction . 0.25) 1206 (length-fraction . 0.25)
1207 (minimum-length-fraction . 0.25) 1207 (minimum-length-fraction . 0.25)
1208 (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods) 1208 (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
1209 (stencil . ,ly:ledger-line-spanner::print) 1209 (stencil . ,ly:ledger-line-spanner::print)
1210 (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1210 (X-extent . #f) 1211 (X-extent . #f)
1211 (Y-extent . #f) 1212 (Y-extent . #f)
1212 (meta . ((class . Spanner) 1213 (meta . ((class . Spanner)
1213 (interfaces . (ledger-line-spanner-interface)))))) 1214 (interfaces . (ledger-line-spanner-interface))))))
1214 1215
1215 (LeftEdge 1216 (LeftEdge
1216 . ( 1217 . (
1217 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-a nchor) 1218 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-a nchor)
1218 (break-align-symbol . left-edge) 1219 (break-align-symbol . left-edge)
1219 (break-visibility . ,center-invisible) 1220 (break-visibility . ,center-invisible)
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1837 (ratio . 0.25) 1838 (ratio . 0.25)
1838 (spanner-id . "") 1839 (spanner-id . "")
1839 (springs-and-rods . ,ly:spanner::set-spacing-rods) 1840 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1840 (stencil . ,ly:slur::print) 1841 (stencil . ,ly:slur::print)
1841 (thickness . 1.2) 1842 (thickness . 1.2)
1842 (vertical-skylines . ,ly:slur::vertical-skylines) 1843 (vertical-skylines . ,ly:slur::vertical-skylines)
1843 (Y-extent . ,ly:slur::height) 1844 (Y-extent . ,ly:slur::height)
1844 (meta . ((class . Spanner) 1845 (meta . ((class . Spanner)
1845 (interfaces . (slur-interface)))))) 1846 (interfaces . (slur-interface))))))
1846 1847
1848 ;; Only should be used to approximate vertical skylines
1849 ;; of a cross-staff slur.
1847 (SlurStub 1850 (SlurStub
1848 . ( 1851 . (
1849 » (avoid-slur . inside) 1852 » (avoid-slur . ,(grob::calc-property-by-grob-copy 'avoid-slur))
1850 (control-points . ,ly:slur::calc-control-points) 1853 (control-points . ,ly:slur::calc-control-points)
1851 (cross-staff . ,slur::if-not-cross-staff-suicide) 1854 (cross-staff . ,slur::if-not-cross-staff-suicide)
1852 » (details . ,default-slur-details) 1855 » (details . ,(grob::calc-property-by-grob-copy 'details))
1853 » (direction . ,ly:slur::direction-from-shadowed-slur) 1856 » (direction . ,(grob::calc-property-by-grob-copy 'direction))
1854 » (height-limit . 2.0) 1857 » (height-limit . ,(grob::calc-property-by-grob-copy 'height-limit))
1855 » (line-thickness . 0.8) 1858 » (line-thickness . ,(grob::calc-property-by-grob-copy 'line-thickness))
1856 » (minimum-length . 1.5) 1859 » ; Slur will take care of minimum-length, so no need to copy property
1857 » (ratio . 0.25) 1860 » (ratio . ,(grob::calc-property-by-grob-copy 'ratio))
1858 » (spanner-id . "") 1861 » (spanner-id . ,(grob::calc-property-by-grob-copy 'spanner-id))
1859 » (springs-and-rods . ,ly:spanner::set-spacing-rods) 1862 » ; Slur will take care of springs-and-rods, so no need to copy property
1860 » (stencil . ,ly:slur::print) 1863 » (thickness . ,(grob::calc-property-by-grob-copy 'thickness))
1861 » (thickness . 1.2)
1862 (transparent . #t) 1864 (transparent . #t)
1863 » (vertical-skylines . ,ly:slur::vertical-skylines) 1865 » (vertical-skylines . ,ly:slur::extremal-stub-vertical-skylines)
1864 » (Y-extent . ,ly:slur::height) 1866 » ; stub only influences on skylines, so no height
1867 » (Y-extent . #f)
1865 (meta . ((class . Spanner) 1868 (meta . ((class . Spanner)
1866 (interfaces . (cross-staff-stub-interface 1869 (interfaces . (cross-staff-stub-interface
1867 » » » » slur-interface 1870 » » » » slur-interface))))))
1868 » » » » slur-stub-interface))))))
1869 1871
1870 (SostenutoPedal 1872 (SostenutoPedal
1871 . ( 1873 . (
1872 (direction . ,RIGHT) 1874 (direction . ,RIGHT)
1873 (extra-spacing-width . (+inf.0 . -inf.0)) 1875 (extra-spacing-width . (+inf.0 . -inf.0))
1874 (font-shape . italic) 1876 (font-shape . italic)
1875 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner 1877 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1876 (self-alignment-X . ,CENTER) 1878 (self-alignment-X . ,CENTER)
1877 (stencil . ,ly:text-interface::print) 1879 (stencil . ,ly:text-interface::print)
1878 (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil) 1880 (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs))) 2156 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs)))
2155 (interfaces . (axis-group-interface 2157 (interfaces . (axis-group-interface
2156 piano-pedal-interface 2158 piano-pedal-interface
2157 side-position-interface)))))) 2159 side-position-interface))))))
2158 2160
2159 (System 2161 (System
2160 . ( 2162 . (
2161 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights ) 2163 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights )
2162 (axes . (,X ,Y)) 2164 (axes . (,X ,Y))
2163 (outside-staff-placement-directive . left-to-right-polite) 2165 (outside-staff-placement-directive . left-to-right-polite)
2164 » (skyline-horizontal-padding . 0.5) 2166 » (skyline-horizontal-padding . 1.0)
2165 (vertical-skylines . ,ly:axis-group-interface::calc-skylines) 2167 (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2166 (X-extent . ,ly:axis-group-interface::width) 2168 (X-extent . ,ly:axis-group-interface::width)
2167 (Y-extent . ,ly:system::height) 2169 (Y-extent . ,ly:system::height)
2168 (meta . ((class . System) 2170 (meta . ((class . System)
2169 (object-callbacks . ((footnotes-before-line-breaking . ,ly:syst em::footnotes-before-line-breaking) 2171 (object-callbacks . ((footnotes-before-line-breaking . ,ly:syst em::footnotes-before-line-breaking)
2170 (footnotes-after-line-breaking . ,ly:syste m::footnotes-after-line-breaking) 2172 (footnotes-after-line-breaking . ,ly:syste m::footnotes-after-line-breaking)
2171 (pure-relevant-grobs . ,ly:system::calc-pu re-relevant-grobs) 2173 (pure-relevant-grobs . ,ly:system::calc-pu re-relevant-grobs)
2172 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common) 2174 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common)
2173 (vertical-skyline-elements . ,ly:system::v ertical-skyline-elements) 2175 (vertical-skyline-elements . ,ly:system::v ertical-skyline-elements)
2174 (vertical-alignment . ,ly:system::get-vert ical-alignment))) 2176 (vertical-alignment . ,ly:system::get-vert ical-alignment)))
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2564 2566
2565 (VerticalAlignment 2567 (VerticalAlignment
2566 . ( 2568 . (
2567 (axes . (,Y)) 2569 (axes . (,Y))
2568 (positioning-done . ,ly:align-interface::align-to-ideal-distances) 2570 (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2569 (stacking-dir . -1) 2571 (stacking-dir . -1)
2570 (vertical-skylines . ,ly:axis-group-interface::combine-skylines) 2572 (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2571 (X-extent . ,ly:axis-group-interface::width) 2573 (X-extent . ,ly:axis-group-interface::width)
2572 (Y-extent . ,ly:axis-group-interface::height) 2574 (Y-extent . ,ly:axis-group-interface::height)
2573 (meta . ((class . Spanner) 2575 (meta . ((class . Spanner)
2574 » » (object-callbacks . ((full-score-pure-minimum-translations . ,l y:align-interface::full-score-pure-minimum-translations) 2576 » » (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc -y-common)
2575 » » » » (Y-common . ,ly:axis-group-interface::calc -y-common)
2576 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs) 2577 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs)
2577 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common))) 2578 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common)))
2578 (interfaces . (align-interface 2579 (interfaces . (align-interface
2579 axis-group-interface)))))) 2580 axis-group-interface))))))
2580 2581
2581 (VerticalAxisGroup 2582 (VerticalAxisGroup
2582 . ( 2583 . (
2583 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights ) 2584 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights )
2584 (axes . (,Y)) 2585 (axes . (,Y))
2585 (default-staff-staff-spacing . ((basic-distance . 9) 2586 (default-staff-staff-spacing . ((basic-distance . 9)
2586 (minimum-distance . 8) 2587 (minimum-distance . 8)
2587 (padding . 1))) 2588 (padding . 1)))
2588 (nonstaff-unrelatedstaff-spacing . ((padding . 0.5))) 2589 (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2589 (outside-staff-placement-directive . left-to-right-polite) 2590 (outside-staff-placement-directive . left-to-right-polite)
2590 (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacin g) 2591 (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacin g)
2591 (stencil . ,ly:axis-group-interface::print) 2592 (stencil . ,ly:axis-group-interface::print)
2592 (skyline-horizontal-padding . 0.1) 2593 (skyline-horizontal-padding . 0.1)
2593 » (vertical-skylines . ,ly:axis-group-interface::calc-skylines) 2594 » (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2594 (X-extent . ,ly:axis-group-interface::width) 2595 (X-extent . ,ly:axis-group-interface::width)
2595 (Y-extent . ,ly:hara-kiri-group-spanner::y-extent) 2596 (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2596 (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback) 2597 (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2597 (meta . ((class . Spanner) 2598 (meta . ((class . Spanner)
2598 (object-callbacks . ( 2599 (object-callbacks . (
2599 (X-common . ,ly:axis-group-interface::calc -x-common) 2600 (X-common . ,ly:axis-group-interface::calc -x-common)
2600 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common) 2601 (pure-Y-common . ,ly:axis-group-interface: :calc-pure-y-common)
2601 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs))) 2602 (pure-relevant-grobs . ,ly:axis-group-inte rface::calc-pure-relevant-grobs)))
2602 2603
2603 (interfaces . (axis-group-interface 2604 (interfaces . (axis-group-interface
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 (if (not (procedure? unpure)) 2847 (if (not (procedure? unpure))
2847 unpure 2848 unpure
2848 (if (memq unpure pure-functions) 2849 (if (memq unpure pure-functions)
2849 (apply unpure args) 2850 (apply unpure args)
2850 (let ((pure (assq unpure pure-conversions-alist))) 2851 (let ((pure (assq unpure pure-conversions-alist)))
2851 (if pure 2852 (if pure
2852 (apply (cdr pure) 2853 (apply (cdr pure)
2853 (append 2854 (append
2854 (list (car args) start end) 2855 (list (car args) start end)
2855 (cdr args)))))))))) 2856 (cdr args))))))))))
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b