]> git.donarmstrong.com Git - lilypond.git/commitdiff
Modify line-interface, so that style=#'line gives a solid line and style = #'dashed...
authorMats Bengtsson <mats.bengtsson@s3.kth.se>
Wed, 14 Nov 2007 12:50:56 +0000 (13:50 +0100)
committerMats Bengtsson <mats.bengtsson@s3.kth.se>
Wed, 14 Nov 2007 12:50:56 +0000 (13:50 +0100)
input/regression/line-arrows.ly
input/regression/line-dashed-period.ly
input/regression/line-style.ly
lily/line-interface.cc
ly/engraver-init.ly

index 7512711cb190c2120fb37aa7b95c5f0eb0bdd6d8..10b9ae9b05ff647f03dc5bcd63e9fe0097e795e7 100644 (file)
@@ -10,7 +10,7 @@
 
 \relative c'' {
   \override TextSpanner #'bound-padding = #1.0
-  \override TextSpanner #'dash-fraction = #'()
+  \override TextSpanner #'style = #line
   \override TextSpanner #'bound-details #'right #'arrow = ##t
   \override TextSpanner #'bound-details #'left #'text = #"fof"
   \override TextSpanner #'bound-details #'right #'text = #"gag"
index dd0b55e8988d473a7189ea09d09339bf2029705f..0ebeb5da05f76043f00b66cb53caf525bc6c96b8 100644 (file)
@@ -14,8 +14,8 @@ starts and ends on a full dash. "
 
 \relative <<
   \new Staff {
-    \override DynamicTextSpanner #'dash-fraction = ##f
     \setTextCresc
+    \set crescendoSpanner = #'line
     c1_\< c c1\!
   }
   \new Staff {
index 4d33f4945bfa54340cbbf817fffe341d9cda85dd..135e89753dd006b82cab497d8c2135ba7318eb56 100644 (file)
@@ -12,7 +12,7 @@
 
   s2
   d2 \glissando d'2
-  \once \override Glissando #'dash-fraction = #0.5
+  \override Glissando #'style = #'dashed-line
   d,2 \glissando d'2
   \override Glissando #'style = #'dotted-line
   d,2 \glissando d'2
index f936b0498f26d2abd1cd5e61d27938a36bf79e37..b3f110f11a73fe9dc687c6b2dec6df081c95f599 100644 (file)
@@ -212,14 +212,13 @@ Line_interface::line (Grob *me, Offset from, Offset to)
   
   Stencil stil;
 
-  SCM dash_fraction = me->get_property ("dash-fraction");
-  if (scm_is_number (dash_fraction) || type == ly_symbol2scm ("dotted-line"))
+  if (type == ly_symbol2scm ("dashed-line") || type == ly_symbol2scm ("dotted-line"))
     {
 
       Real fraction
        = type == ly_symbol2scm ("dotted-line")
        ? 0.0
-       : robust_scm2double (dash_fraction, 0.4);
+       : robust_scm2double (me->get_property ("dash-fraction"), 0.4);
 
       fraction = min (max (fraction, 0.0), 1.0);
       Real period = Staff_symbol_referencer::staff_space (me)
@@ -249,11 +248,14 @@ Line_interface::line (Grob *me, Offset from, Offset to)
 }
 
 ADD_INTERFACE (Line_interface,
-              "Generic line objects. Any object using lines supports this.  Normally, "
-              "you get a straight line. If @code{dash-period} is defined, a dashed line is "
-              "produced; the length of the dashes is tuned with "
+              "Generic line objects. Any object using lines supports this. "
+              "The property @code{style} can be @code{line}, "
+              "@code{dashed-line}, @code{trill}, \n"
+              "@code{dotted-line} or @code{zigzag}.\n"
+              "\n",
+              "For dashed-line, the length of the dashes is tuned with "
               "@code{dash-fraction}. If the latter is set to 0, a dotted line is "
-              "produced. If @code{dash-fraction} is negative, the line is made "
+              "produced. If @code{dash-period} is negative, the line is made "
               "transparent.",
 
               /* properties */
index 4a09d7c60954c8ba874ef4fe8d511dd436d5c0d7..e390ef7441f72cf267aa9adb44eed316a3c4e618 100644 (file)
@@ -744,14 +744,10 @@ of Editio Vaticana."
 
   %% Prepare TextSpanner for \episem{Initium|Finis} use.
   %%
-  %% N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will
-  %% always produce dashed lines, regardless of the style property.
-  %%
   %% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
   %% required to force the articulation signs being placed vertically
   %% tightly to the correpsonding note heads.
   %%
-  \override TextSpanner #'dash-fraction = #'()
   \override TextSpanner #'style = #'line
   \override TextSpanner #'padding = #-0.1
 }