X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fambitus.cc;h=a702fffb501d1c82175bcb47aa1cf3ecc25fc780;hb=f07f18bef861d6afa48b941b7579079d5d40df80;hp=bf05f8c4c139a50576524086a9f1de62370a0fea;hpb=c659cb200486c2f908703696a1b2873e78c8160a;p=lilypond.git diff --git a/lily/ambitus.cc b/lily/ambitus.cc index bf05f8c4c1..a702fffb50 100644 --- a/lily/ambitus.cc +++ b/lily/ambitus.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2002--2004 Juergen Reuter + (c) 2002--2005 Juergen Reuter */ #include "ambitus.hh" @@ -17,26 +17,26 @@ #include "lookup.hh" #include "group-interface.hh" -MAKE_SCHEME_CALLBACK (Ambitus,print,1); +MAKE_SCHEME_CALLBACK (Ambitus, print, 1); SCM Ambitus::print (SCM smob) { - Item *me = (Item*) unsmob_grob (smob); + Item *me = (Item *) unsmob_grob (smob); Stencil stencil; // join heads - Link_array heads (Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-heads")); + Link_array heads (extract_grob_array (me, ly_symbol2scm ("note-heads"))); if (to_boolean (me->get_property ("join-heads")) - && heads.size() > 1) + && heads.size () > 1) { Grob *common - = common_refpoint_of_array (heads.slice (0,2), me, Y_AXIS); + = common_refpoint_of_array (heads.slice (0, 2), me, Y_AXIS); Grob *minh = heads[0]; Grob *maxh = heads[1]; - - if (minh->relative_coordinate (common, Y_AXIS) > - maxh->relative_coordinate (common, Y_AXIS)) + + if (minh->relative_coordinate (common, Y_AXIS) + > maxh->relative_coordinate (common, Y_AXIS)) { Grob *t = maxh; maxh = minh; @@ -46,19 +46,19 @@ Ambitus::print (SCM smob) Real pad = 0.35; Real pmax = maxh->extent (common, Y_AXIS)[DOWN] - pad; Real pmin = minh->extent (common, Y_AXIS)[UP] + pad; - + if (pmin < pmax) { Real linethickness = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness")) - * robust_scm2double (me->get_property ("thickness"), 1.0); + * robust_scm2double (me->get_property ("thickness"), 1.0); Real blotdiameter = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter")); - Interval x_extent = 0.5 * linethickness *Interval (-1,1); + Interval x_extent = 0.5 * linethickness * Interval (-1, 1); Interval y_extent = Interval (pmin, pmax); Box line_box (x_extent, y_extent); Stencil line = Lookup::round_filled_box (line_box, blotdiameter); - line.translate_axis (- me-> relative_coordinate (common, Y_AXIS), - Y_AXIS); + line.translate_axis (- me->relative_coordinate (common, Y_AXIS), + Y_AXIS); return line.smobbed_copy (); } } @@ -67,5 +67,5 @@ Ambitus::print (SCM smob) } ADD_INTERFACE (Ambitus, "ambitus-interface", - "The line between note heads for a pitch range.", - "thickness note-heads join-heads"); + "The line between note heads for a pitch range.", + "thickness note-heads join-heads");