OLD | NEW |
1 /* | 1 /* |
2 slur.cc -- implement external interface for Slur | 2 slur.cc -- implement external interface for Slur |
3 | 3 |
4 source file of the GNU LilyPond music typesetter | 4 source file of the GNU LilyPond music typesetter |
5 | 5 |
6 (c) 1996--2009 Han-Wen Nienhuys <hanwen@xs4all.nl> | 6 (c) 1996--2009 Han-Wen Nienhuys <hanwen@xs4all.nl> |
7 Jan Nieuwenhuizen <janneke@gnu.org> | 7 Jan Nieuwenhuizen <janneke@gnu.org> |
8 */ | 8 */ |
9 | 9 |
10 #include "slur.hh" | 10 #include "slur.hh" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 Real staff_thick = Staff_symbol_referencer::line_thickness (me); | 113 Real staff_thick = Staff_symbol_referencer::line_thickness (me); |
114 Real base_thick = staff_thick | 114 Real base_thick = staff_thick |
115 * robust_scm2double (me->get_property ("thickness"), 1); | 115 * robust_scm2double (me->get_property ("thickness"), 1); |
116 Real line_thick = staff_thick | 116 Real line_thick = staff_thick |
117 * robust_scm2double (me->get_property ("line-thickness"), 1); | 117 * robust_scm2double (me->get_property ("line-thickness"), 1); |
118 | 118 |
119 Bezier one = get_curve (me); | 119 Bezier one = get_curve (me); |
120 Stencil a; | 120 Stencil a; |
121 | 121 |
122 SCM p = me->get_property ("dash-period"); | 122 SCM dash_definition = me->get_property ("dash-definition"); |
123 SCM f = me->get_property ("dash-fraction"); | 123 a = Lookup::slur (one, |
124 if (scm_is_number (p) && scm_is_number (f)) | 124 get_grob_direction (me) * base_thick, |
125 a = Lookup::dashed_slur (one, line_thick, robust_scm2double (p, 1.0), | 125 » » line_thick, |
126 » » » robust_scm2double (f, 0)); | 126 dash_definition); |
127 else | |
128 a = Lookup::slur (one, | |
129 » » get_grob_direction (me) * base_thick, | |
130 » » line_thick); | |
131 | 127 |
132 #if DEBUG_SLUR_SCORING | 128 #if DEBUG_SLUR_SCORING |
133 SCM annotation = me->get_property ("annotation"); | 129 SCM annotation = me->get_property ("annotation"); |
134 if (!scm_is_string (annotation)) | 130 if (!scm_is_string (annotation)) |
135 { | 131 { |
136 SCM debug = me->layout ()->lookup_variable (ly_symbol2scm ("debug-slur-sco
ring")); | 132 SCM debug = me->layout ()->lookup_variable (ly_symbol2scm ("debug-slur-sco
ring")); |
137 if (to_boolean (debug)) | 133 if (to_boolean (debug)) |
138 annotation = me->get_property ("quant-score"); | 134 annotation = me->get_property ("quant-score"); |
139 } | 135 } |
140 ·· | 136 ·· |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 return scm_from_bool (common != me->get_parent (Y_AXIS)); | 406 return scm_from_bool (common != me->get_parent (Y_AXIS)); |
411 } | 407 } |
412 | 408 |
413 ADD_INTERFACE (Slur, | 409 ADD_INTERFACE (Slur, |
414 "A slur.", | 410 "A slur.", |
415 ··············· | 411 ··············· |
416 /* properties */ | 412 /* properties */ |
417 "annotation " | 413 "annotation " |
418 "avoid-slur " /* UGH. */ | 414 "avoid-slur " /* UGH. */ |
419 "control-points " | 415 "control-points " |
420 » "dash-fraction " | 416 "dash-definition " |
421 » "dash-period " | |
422 "details " | 417 "details " |
423 "direction " | 418 "direction " |
424 "eccentricity " | 419 "eccentricity " |
425 "encompass-objects " | 420 "encompass-objects " |
426 "height-limit " | 421 "height-limit " |
427 "inspect-quants " | 422 "inspect-quants " |
428 "inspect-index " | 423 "inspect-index " |
429 "line-thickness " | 424 "line-thickness " |
430 "note-columns " | 425 "note-columns " |
431 "positions " | 426 "positions " |
432 "quant-score " | 427 "quant-score " |
433 "ratio " | 428 "ratio " |
434 "thickness " | 429 "thickness " |
435 ); | 430 ); |
436 | 431 |
OLD | NEW |