]> git.donarmstrong.com Git - lilypond.git/commitdiff
fix input regression cluster cross-staff.ly
authorValentin Villenave <valentin@villenave.net>
Sun, 13 Jan 2008 18:01:45 +0000 (19:01 +0100)
committerValentin Villenave <valentin@villenave.net>
Sun, 13 Jan 2008 18:01:45 +0000 (19:01 +0100)
lily/cluster.cc
lily/include/cluster.hh
scm/define-grobs.scm

index 7a84195493df6efd7e3dedbe4562e0e168fb4c49..c4b11b38c5b2f72084532b7ab22d896b76e44a32 100644 (file)
@@ -111,6 +111,18 @@ brew_cluster_piece (Grob *me, vector<Offset> bottom_points, vector<Offset> top_p
   return out;
 }
 
+MAKE_SCHEME_CALLBACK (Cluster, calc_cross_staff, 1);
+SCM
+Cluster::calc_cross_staff (SCM smob)
+{
+  Grob *me = unsmob_grob (smob);
+
+  extract_grob_set (me, "columns", cols);
+  Grob *commony = common_refpoint_of_array (cols, me, Y_AXIS);
+
+  return scm_from_bool (commony != me->get_parent (Y_AXIS));
+}
+
 MAKE_SCHEME_CALLBACK (Cluster, print, 1);
 SCM
 Cluster::print (SCM smob)
index 3081b1b093bb77aeff3f251614e5d4fc87385c62..e15d0024145bf4fbab53b253e4c41bc70554fdf7 100644 (file)
@@ -16,6 +16,7 @@ class Cluster
 {
 public:
   DECLARE_SCHEME_CALLBACK (print, (SCM));
+  DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
   DECLARE_GROB_INTERFACE();
 };
 
index 800362eb92956a1fa0ca853de5633ccad2e1345a..658d2dfeb0c8ae5a2c615b08beeefa29fba62989 100644 (file)
        (stencil . ,ly:cluster::print)
        (minimum-length . 0.0)
        (padding . 0.25)
+       (cross-staff . ,ly:cluster::calc-cross-staff)
        (style . ramp)
        (meta . ((class . Spanner)
                 (interfaces . (cluster-interface))))))