From 721d93c83d1f048a9c9519a36528639e085a37a1 Mon Sep 17 00:00:00 2001 From: hanwen Date: Sun, 18 Jan 2004 22:07:40 +0000 Subject: [PATCH] * lily/line-interface.cc (line): remove thickness from calling interface. * lily/hairpin.cc: use Line_interface * lily/line-interface.cc: new file. Line_interface for everything with dotted/dashed lines. --- lily/hairpin.cc | 4 +--- lily/line-interface.cc | 12 ++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lily/hairpin.cc b/lily/hairpin.cc index 41e9eef5ef..8693650018 100644 --- a/lily/hairpin.cc +++ b/lily/hairpin.cc @@ -119,9 +119,7 @@ Hairpin::brew_molecule (SCM smob) */ Molecule mol; - mol = Line_interface::line (me, - Offset (0, starth), - Offset (width, endh)); + mol = Line_interface::line (me, Offset (0, starth), Offset (width, endh)); mol.add_molecule (Line_interface::line (me, Offset (0, -starth), Offset (width, -endh))); diff --git a/lily/line-interface.cc b/lily/line-interface.cc index e3660924f8..41f272c90a 100644 --- a/lily/line-interface.cc +++ b/lily/line-interface.cc @@ -73,14 +73,14 @@ Line_interface::line (Grob *me, Offset from, Offset to) { Real thick = me->get_paper()->get_realvar (ly_symbol2scm ("linethickness")); thick *= robust_scm2double (me->get_grob_property ("thickness"), 1.0); // todo: staff sym referencer? - + SCM type = me->get_grob_property ("style"); - if (type == ly_symbol2scm ("dotted-line") - || type == ly_symbol2scm ("dashed-line")) + + SCM dash_fraction = me->get_grob_property ("dash-fraction"); + if (gh_number_p (dash_fraction) || type == ly_symbol2scm ("dotted-line")) { Real fraction = - robust_scm2double (me->get_grob_property ("dash-fraction"), - (type == ly_symbol2scm ("dotted-line")) ? 0.0 : 0.4); + robust_scm2double (dash_fraction, (type == ly_symbol2scm ("dotted-line")) ? 0.0 : 0.4); fraction = (fraction >? 0)