diff options
author | Mats Bengtsson <mats.bengtsson@s3.kth.se> | 2007-11-14 13:50:56 +0100 |
---|---|---|
committer | Mats Bengtsson <mats.bengtsson@s3.kth.se> | 2007-11-14 13:50:56 +0100 |
commit | bb5b3568f7ad1e96c4f067d1ebc9b0c2d2bd3b37 (patch) | |
tree | 295029ed7af3b244f675a912bd48c7c8549082bc | |
parent | f27c93f9e9a4876c332e7050e5a60a5f12a4e1bf (diff) |
Modify line-interface, so that style=#'line gives a solid line and style = #'dashed-line gives a dashed line.
-rw-r--r-- | input/regression/line-arrows.ly | 2 | ||||
-rw-r--r-- | input/regression/line-dashed-period.ly | 2 | ||||
-rw-r--r-- | input/regression/line-style.ly | 2 | ||||
-rw-r--r-- | lily/line-interface.cc | 16 | ||||
-rw-r--r-- | ly/engraver-init.ly | 4 |
5 files changed, 12 insertions, 14 deletions
diff --git a/input/regression/line-arrows.ly b/input/regression/line-arrows.ly index 7512711cb1..10b9ae9b05 100644 --- a/input/regression/line-arrows.ly +++ b/input/regression/line-arrows.ly @@ -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" diff --git a/input/regression/line-dashed-period.ly b/input/regression/line-dashed-period.ly index dd0b55e898..0ebeb5da05 100644 --- a/input/regression/line-dashed-period.ly +++ b/input/regression/line-dashed-period.ly @@ -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 { diff --git a/input/regression/line-style.ly b/input/regression/line-style.ly index 4d33f4945b..135e89753d 100644 --- a/input/regression/line-style.ly +++ b/input/regression/line-style.ly @@ -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 diff --git a/lily/line-interface.cc b/lily/line-interface.cc index f936b0498f..b3f110f11a 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -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 */ diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 4a09d7c609..e390ef7441 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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 } |