2 dots.cc -- implement Dots
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "paper-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");
29 Stencil d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
30 Real dw = d.extent (X_AXIS).length ();
34 we need to add a real blank box, to assure that
35 side-positioning doth not cancel the left-most padding. */
38 TODO: this should be handled by side-position padding.
40 mol = Lookup::blank (Box (Interval (0,0),
43 for (int i = gh_scm2int (c); i--;)
45 d.translate_axis (2*dw,X_AXIS);
46 mol.add_at_edge (X_AXIS, RIGHT, d, dw, 0);
49 return mol.smobbed_copy ();
55 ADD_INTERFACE (Dots, "dots-interface",
56 "The dots to go with a notehead or rest."
57 "@code{direction} sets the preferred direction to move in case of staff "
59 "direction dot-count");