]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/bar-line.cc
Fix #483.
[lilypond.git] / lily / bar-line.cc
index 48b9c4715da6e4e09631bb7b873812b82e123ddc..369e3d779d8639a48e3175df3d55586172680369 100644 (file)
 #include "staff-symbol-referencer.hh"
 #include "line-interface.hh"
 
+/* Get the extent of just the line part of the bar (ie. excluding any
+   repeat dots) */
+Interval
+Bar_line::bar_y_extent (Grob *me, Grob *refpoint)
+{
+  SCM size = me->get_property ("bar-size");
+  if (!scm_is_number (size))
+    return Interval ();
+
+  Real h = scm_to_double (size);
+  Interval iv (-h/2, h/2);
+
+  iv.translate (me->relative_coordinate (refpoint, Y_AXIS));
+  return iv;
+}
+
 MAKE_SCHEME_CALLBACK (Bar_line, print, 1);
 SCM
 Bar_line::print (SCM smob)
@@ -292,6 +308,7 @@ ADD_INTERFACE (Bar_line,
 
 
               /* properties */
+              "allow-span-bar "
               "gap "
               "kern "
               "thin-kern "