Dots::brew_molecule (SCM d)
{
Score_element *sc = unsmob_element (d);
- /*
- Molecule mol (Lookup::blank (Box (Interval (0,0),
- Interval (0,0))));
- */
-
Molecule mol;
SCM c = sc->get_elt_property ("dot-count");
{
Molecule d = Font_interface::get_default_font (sc)->find_by_name (String ("dots-dot"));
Real dw = d.extent (X_AXIS).length ();
- // d.translate_axis (-dw, X_AXIS);
+
+ /*
+ we need to add a real blank box, to assure that
+ side-positioning doth not cancel the left-most padding. */
+ mol = Lookup::blank (Box (Interval (0,0),
+ Interval (0,0)));
+
for (int i = gh_scm2int (c); i--; )
{
d.translate_axis (2*dw,X_AXIS);
{
Real my_extent= empty_b () ? 0.0 : dim_[a][d];
Interval i (m.extent (a));
+ Real his_extent;
if (i.empty_b ())
- programming_error ("Molecule::add_at_edge: adding empty molecule.");
-
- Real his_extent = i[-d];
+ {
+ programming_error ("Molecule::add_at_edge: adding empty molecule.");
+ his_extent = 0.0;
+ }
+ else
+ his_extent = i[-d];
+
Real offset = my_extent - his_extent;
Molecule toadd (m);
toadd.translate_axis (offset + d * padding, a);