]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-line.cc
Handle unwritable midi file.
[lilypond.git] / lily / bar-line.cc
index cd5729a02eaf5ed0884ecd9e3961cb45f0163a72..a6b5336202460be324069950eb688785cb65fb87 100644 (file)
@@ -33,13 +33,14 @@ Bar_line::print (SCM smob)
       if (sz <= 0)
        return SCM_EOL;
 
-      return compound_barline (me, str, sz).smobbed_copy ();
+      return compound_barline (me, str, sz, true).smobbed_copy ();
     }
   return SCM_EOL;
 }
 
 Stencil
-Bar_line::compound_barline (Grob *me, String str, Real h)
+Bar_line::compound_barline (Grob *me, String str, Real h,
+                           bool rounded)
 {
   Real kern = robust_scm2double (me->get_property ("kern"), 1);
   Real thinkern = robust_scm2double (me->get_property ("thin-kern"), 1);
@@ -54,8 +55,8 @@ Bar_line::compound_barline (Grob *me, String str, Real h)
   hair *= staffline;
   fatline *= staffline;
 
-  Stencil thin = simple_barline (me, hair, h);
-  Stencil thick = simple_barline (me, fatline, h);
+  Stencil thin = simple_barline (me, hair, h, rounded);
+  Stencil thick = simple_barline (me, fatline, h, rounded);
   Stencil dot = Font_interface::get_default_font (me)->find_by_name ("dots.dot");
 
   int lines = Staff_symbol_referencer::line_count (me);
@@ -132,7 +133,7 @@ Bar_line::compound_barline (Grob *me, String str, Real h)
          Real y = (- (c - 1.0) / 2 + 0.5 + i * staff_space);
          Stencil d (dot);
 
-         d. translate_axis (y, Y_AXIS);
+         d.translate_axis (y, Y_AXIS);
          m.add_stencil (d);
        }
     }
@@ -142,9 +143,13 @@ Bar_line::compound_barline (Grob *me, String str, Real h)
 Stencil
 Bar_line::simple_barline (Grob *me,
                          Real w,
-                         Real h)
+                         Real h,
+                         bool rounded)
 {
-  Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
+  Real blot =
+    rounded
+    ? me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"))
+    : 0.0;
 
   return Lookup::round_filled_box (Box (Interval (0, w), Interval (-h / 2, h / 2)), blot);
 }
@@ -179,7 +184,6 @@ Bar_line::before_line_breaking (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
-
 MAKE_SCHEME_CALLBACK (Bar_line, get_staff_bar_size, 1);
 SCM
 Bar_line::get_staff_bar_size (SCM smob)
@@ -188,7 +192,7 @@ Bar_line::get_staff_bar_size (SCM smob)
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_property ("bar-size");
   if (scm_is_number (size))
-    return scm_make_real (scm_to_double (size)*ss);
+    return scm_make_real (scm_to_double (size) * ss);
   else if (Staff_symbol_referencer::get_staff_symbol (me))
     {
       /*