]> git.donarmstrong.com Git - lilypond.git/commitdiff
replace no-spacing-rods with extra-spacing-width and add
authorJoe Neeman <joeneeman@gmail.com>
Tue, 19 Dec 2006 08:54:50 +0000 (10:54 +0200)
committerJoe Neeman <joeneeman@gmail.com>
Tue, 19 Dec 2006 08:54:50 +0000 (10:54 +0200)
infinite-spacing-height to fix fatText

Documentation/user/programming-interface.itely
Documentation/user/tweaks.itely
Documentation/user/working.itely
lily/item.cc
lily/separation-item.cc
ly/property-init.ly
scm/define-grob-properties.scm
scm/define-grobs.scm

index 9a62200bbabba423e9f2f34d9c7609a9e1d8af4b..1cadde8f2ecedbc21556b1ca58c6a8562ad44e78 100644 (file)
@@ -123,7 +123,7 @@ tempoMark = #(define-music-function (parser location padding marktext)
                                     (number? string?)
 #{
   \once \override Score . RehearsalMark #'padding = $padding
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $marktext }
 #})
 
index bbef69b00b094477b42670432b0a8cd17ad0040e..b26704c13c5f28c8cb78ca42e17b466d7868a104 100644 (file)
@@ -460,7 +460,7 @@ tempoMark = #(define-music-function (parser location padding marktext)
                                     (number? string?)
 #{
   \once \override Score . RehearsalMark #'padding = $padding
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $marktext }
 #})
 
index 2872272a9f09c7341d70129e976dd0e41669ee5b..ff343cf51e4e024853f1d22c64d75e0572f68c83 100644 (file)
@@ -298,7 +298,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $markp }
 #})
 
@@ -326,7 +326,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #@{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup @{ \bold $markp @}
 #@})
 @end example
@@ -354,7 +354,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $markp }
 #})
 
@@ -383,7 +383,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #@{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup @{ \bold $markp @}
 #@})
 
@@ -408,7 +408,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $markp }
 #})
 
@@ -450,7 +450,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #@{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup @{ \bold $markp @}
 #@})
 
@@ -475,7 +475,7 @@ mpdolce = #(make-dynamic-script (markup #:hspace 1 #:translate (cons 5 0)
 tempoMark = #(define-music-function (parser location markp) (string?)
 #{
   \once \override Score . RehearsalMark #'self-alignment-X = #left
-  \once \override Score . RehearsalMark #'no-spacing-rods = ##t
+  \once \override Score . RehearsalMark #'extra-spacing-width = #'(+inf.0 . -inf.0)
   \mark \markup { \bold $markp }
 #})
 
index 173df20ed87fd7b19451d2f4b212ea9c0dc18eea..5cf717a300695192cf49726f8f7dbce18fd18187 100644 (file)
@@ -233,5 +233,6 @@ ADD_INTERFACE (Item,
 
               /* properties */
               "break-visibility "
-              "no-spacing-rods "
+              "extra-spacing-width "
+              "infinite-spacing-height "
               "non-musical")
index 0a6c085afcf41a7f1f433f9f4b1a2cf319c0792a..0867007375deff202948ba4c7c88a6eb663df03b 100644 (file)
@@ -109,14 +109,15 @@ Separation_item::boxes (Grob *me, Grob *left)
          continue;
        }
 
-      if (to_boolean (il->get_property ("no-spacing-rods")))
-       continue;
-
       Interval y (il->pure_height (ycommon, 0, very_large));
       Interval x (il->extent (pc, X_AXIS));
 
-      SCM padding = elts[i]->get_property ("padding");
-      x.widen (robust_scm2double (padding, 0));
+      Interval extra = robust_scm2interval (elts[i]->get_property ("extra-spacing-width"),
+                                           Interval (0, 0));
+      x[LEFT] += extra[LEFT];
+      x[RIGHT] += extra[RIGHT];
+      if (to_boolean (elts[i]->get_property ("infinite-spacing-height")))
+       y = Interval (-infinity_f, infinity_f);
  
       out.push_back (Box (x, y));
     }
index 10e301af306ccb3e24efcfc30c4289ec0ab208b9..f7fc11ae7358f6773049f39e729968c690b6ac2d 100644 (file)
@@ -123,8 +123,11 @@ endincipit =  \context Staff {
 autoBeamOff = \set autoBeaming = ##f
 autoBeamOn = \set autoBeaming = ##t
 
-fatText = \override TextScript  #'no-spacing-rods = ##f
-emptyText = \override TextScript  #'no-spacing-rods = ##t
+fatText = { \override TextScript  #'extra-spacing-width = #'(0 . 0)
+            \override TextScript  #'infinite-spacing-height = ##t }
+
+emptyText = { \override TextScript  #'extra-spacing-width = #'(+inf.0 . -inf.0)
+              \override TextScript  #'infinite-spacing-height = ##f }
 
 showStaffSwitch = \set followVoice = ##t
 hideStaffSwitch = \set followVoice = ##f
index b46dc5aae7a55f641f85e6125c98dc98798a1b19..b9012c52d7891d461637124c43022aa4ce6d8629 100644 (file)
@@ -141,6 +141,7 @@ edges '(@var{left-text} . @var{right-text}).")
      (extra-X-extent ,number-pair? "A grob is enlarged in X dimension
 by this much.")
      (extra-Y-extent ,number-pair? "See @code{extra-X-extent}.")
+     (extra-spacing-width ,number-pair? "In the horizontal spacing problem, we pad each item by this amount (by adding the car on the left side of the item and adding the cdr on the right side of the item). In order to make a grob take up no horizontal space at all, set this to (+inf.0 . -inf.0)")
      (X-extent ,number-pair? "Hard coded extent in X direction. ")
      (Y-extent ,number-pair? "See @code{X-extent}.")
      (extra-offset ,number-pair? "A pair representing an offset. This
@@ -202,6 +203,9 @@ of note-column for horizontal shifting. This is used by
 Choices are @code{around}, @code{inside}, @code{outside}.  If unset, script
 and slur ignore eachother.")
      (ignore-collision ,boolean? "If set, don't do note collision resolution on this NoteColumn.")
+     (infinite-spacing-height ,boolean? "If true, then for the purposes of
+horizontal spacing, treat this item as though it were infinitely tall. That
+is, no object from another column will be allowed to stick above or below this item.")
      (inspect-quants ,number-pair? "If debugging is set,
 set beam/slur quant to this position, and print the respective scores.")
      (inspect-index ,integer? "If debugging is set,
@@ -269,8 +273,6 @@ to flip the direction of custos stem.")
      (note-names ,vector? "Vector of strings containing names for
 easy-notation note heads.")
      (no-ledgers ,boolean? "If set, don't draw ledger lines on this object.")
-     (no-spacing-rods ,boolean? "Items with this property do not cause
-spacing constraints.")
      (no-stem-extend ,boolean? "If set, notes with ledger lines do not
 get stems extending to the middle staff line.")
      (non-musical ,boolean? "True if the grob belongs in a NonMusicalPaperColumn.")
index 47ef19a696235f613e50a13b3d06eb7c7dfc0dd2..f258856924849a94c50d4be736b6966310e1fd99 100644 (file)
        (layer . 0)
        (break-visibility . ,all-visible)
        (non-musical . #t)
+       (extra-spacing-width . (-0.3 . 0.3))
 
        (stencil . ,ly:bar-line::print)
        (glyph-name . ,bar-line::calc-glyph-name)
     (CombineTextScript
      . (
        (stencil . ,ly:text-interface::print)
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (Y-offset . ,ly:side-position-interface::y-aligned-side)
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
        (direction . ,UP)
        (font-encoding . fetaDynamic)
        (font-shape . italic)
        (avoid-slur . around)
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (outside-staff-priority . 250)
        (meta . ((class . Item)
                 (interfaces . (font-interface
        (stencil . ,ly:text-interface::print)
        (direction . ,RIGHT)
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
        (font-shape . italic)
        (self-alignment-X . 0)
 
     (SustainPedal
      . (
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (stencil . ,ly:sustain-pedal::print)
        (self-alignment-X . 0)
        (direction . ,RIGHT)
 
     (TextScript
      . (
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
        (Y-offset . ,ly:side-position-interface::y-aligned-side)
        (side-axis . ,Y)
      . (
        (stencil . ,ly:text-interface::print)
        (font-shape . italic)
-       (no-spacing-rods . #t)
+       (extra-spacing-width . (+inf.0 . -inf.0))
        (self-alignment-X . 0)
        (direction . ,RIGHT)
        (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner