From e6423e6da656bd9f4eac1cc3dbc1e400d8e2c217 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:02:03 +0000 Subject: [PATCH] lilypond-1.3.103 --- lily/dots.cc | 13 +++++++------ lily/molecule.cc | 11 ++++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lily/dots.cc b/lily/dots.cc index 28ef9a5526..78a6d41f7e 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -43,11 +43,6 @@ SCM 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"); @@ -56,8 +51,14 @@ Dots::brew_molecule (SCM d) { 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); diff --git a/lily/molecule.cc b/lily/molecule.cc index 240a8aec72..fa83fc6a6c 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -106,10 +106,15 @@ Molecule::add_at_edge (Axis a, Direction d, Molecule const &m, Real padding) { 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); -- 2.39.5