]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-grobs.scm
Replace XY-offset closures with aligned_on_parent where possible
[lilypond.git] / scm / define-grobs.scm
index 5720838880721d5b594750151f88ff624e231d8f..2a3faa3491df8ef2baf9c8b9932eac5c3f299bc5 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 1998--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
         (staff-padding . 0.25)
         (stencil . ,ly:accidental-interface::print)
         (X-extent . ,ly:accidental-interface::width)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::centered-on-x-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-extent . ,accidental-interface::height)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (meta . ((class . Item)
         (self-alignment-X . ,CENTER)
         (staff-padding . 0.7)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::centered-on-x-parent)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (side-axis . ,Y)
         (staff-padding . 0.25)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::centered-on-y-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (meta . ((class . Item)
         (stencil . ,ly:text-interface::print)
         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
-        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,(scale-by-font-size -0.6)) ; center on an 'm'
         (meta . ((class . Item)
                  (interfaces . (dynamic-interface
         (layer . 0)
         (self-alignment-X . ,CENTER)
         (stencil . ,ly:grid-line-interface::print)
-        (X-extent  . ,ly:grid-line-interface::width)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::centered-on-x-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-extent . ,ly:grid-line-interface::width)
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (meta . ((class . Item)
                  (interfaces . (grid-line-interface
                                 self-alignment-interface))))))
      . (
         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
         (break-align-symbol . left-edge)
-        (break-visibility . ,center-invisible)
+        (break-visibility . ,begin-of-line-visible)
         (non-musical . #t)
-        (extra-spacing-height . (+inf.0 . -inf.0))
         (space-alist . (
                         (ambitus . (extra-space . 2.0))
                         (breathing-sign . (minimum-space . 0.0))
                         (right-edge . (extra-space . 0.0))
                         ))
         (X-extent . (0 . 0))
+        (Y-extent . (0 . 0))
         (meta . ((class . Item)
                  (interfaces . (break-aligned-interface))))))
 
         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
         (staff-padding . 0.4)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-centered-on-y-parent)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (skyline-horizontal-padding . 0.2)
         (staff-padding . 0.25)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-centered-on-y-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (self-alignment-X . ,CENTER)
         (staff-padding . 0.25)
         (stencil . ,ly:text-interface::print)
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-centered-on-y-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,side-position-interface::y-aligned-side)
         (Y-extent . ,grob::always-Y-extent-from-stencil)
         (meta . ((class . Spanner)
         (style . ,ly:stem-tremolo::calc-style)
         (X-extent . ,ly:stem-tremolo::width)
         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:stem-tremolo::pure-height))
-        (X-offset . ,(ly:make-simple-closure
-                      `(,+
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::centered-on-x-parent))
-                        ,(ly:make-simple-closure
-                          (list ly:self-alignment-interface::x-aligned-on-self)))))
+        (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
         (Y-offset . ,(ly:make-unpure-pure-container ly:stem-tremolo::calc-y-offset ly:stem-tremolo::pure-calc-y-offset))
         (meta . ((class . Item)
                  (interfaces . (self-alignment-interface
         (direction . ,tuplet-number::calc-direction)
         (font-shape . italic)
         (font-size . -2)
+        (knee-to-beam . #t)
         (stencil . ,ly:tuplet-number::print)
         (text . ,tuplet-number::calc-denominator-text)
         (X-offset . ,ly:tuplet-number::calc-x-offset)