]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spaceable-grob.cc
* lily/spacing-determine-loose-columns.cc: new file.
[lilypond.git] / lily / spaceable-grob.cc
index a36fe3c175adfb905d657a3dc8df984ac5c7341c..79b4173efd91036eadc6b9c479d3caa3990b6dfb 100644 (file)
@@ -99,6 +99,22 @@ Spaceable_grob::add_spring (Grob *me, Grob *p, Real d, Real inverse_strength)
   me->set_object ("ideal-distances", ideal);
 }
 
+void
+Spaceable_grob::get_spring (Grob *me, Grob *other, Real *dist, Real *inv_strength)
+{
+  for (SCM s = me->get_object ("ideal-distances");
+       scm_is_pair (s); s = scm_cdr (s))
+    {
+      Spring_smob *spring = unsmob_spring (scm_car (s));
+      if (spring && spring->other_ == other)
+       {
+         *dist = spring->distance_;
+         *inv_strength = spring->inverse_strength_;
+       }
+    }
+}
+
+
 void
 Spaceable_grob::remove_interface (Grob *me)
 {