2 dots.cc -- implement Dots
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
12 #include "output-def.hh"
13 #include "font-interface.hh"
15 #include "staff-symbol-referencer.hh"
16 #include "directional-element-interface.hh"
18 MAKE_SCHEME_CALLBACK (Dots, print, 1);
22 Grob *sc = unsmob_grob (d);
25 SCM c = sc->get_property ("dot-count");
27 if (scm_is_number (c))
29 Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots.dot"));
30 Real dw = d.extent (X_AXIS).length ();
33 we need to add a real blank box, to assure that
34 side-positioning doth not cancel the left-most padding. */
37 TODO: this should be handled by side-position padding.
39 mol = Lookup::blank (Box (Interval (0, 0),
42 for (int i = scm_to_int (c); i--;)
44 d.translate_axis (2 * dw, X_AXIS);
45 mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
48 return mol.smobbed_copy ();
51 ADD_INTERFACE (Dots, "dots-interface",
52 "The dots to go with a notehead or rest."
53 "@code{direction} sets the preferred direction to move in case of staff "