]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/cluster.cc
Fix #576.
[lilypond.git] / lily / cluster.cc
index 2c41b9a1749e05e3ae7b0257f7e83954bd4845ca..c4b11b38c5b2f72084532b7ab22d896b76e44a32 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2002--2006 Juergen Reuter <reuter@ipd.uka.de>
+  (c) 2002--2007 Juergen Reuter <reuter@ipd.uka.de>
 
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
@@ -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)
@@ -204,7 +216,7 @@ struct Cluster_beacon
 {
 public:
   DECLARE_SCHEME_CALLBACK (height, (SCM));
-  DECLARE_GROB_INTERFACE();
+  DECLARE_GROB_INTERFACE ();
 };
 
 MAKE_SCHEME_CALLBACK (Cluster_beacon, height, 1);