]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.103
authorfred <fred>
Wed, 27 Mar 2002 00:02:03 +0000 (00:02 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:02:03 +0000 (00:02 +0000)
lily/dots.cc
lily/molecule.cc

index 28ef9a5526cd1f688be0d42dba1cf092cf234a9b..78a6d41f7ede9b060f1a0cbf125f6c0004613c2b 100644 (file)
@@ -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);
index 240a8aec7242a6e2ae37a4ee45199acbdcf4c7e2..fa83fc6a6c49bc4dd0259c1d979bbfa07bfeb8a9 100644 (file)
@@ -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);