]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-spanner.cc
release: 0.1.39
[lilypond.git] / lily / text-spanner.cc
index 1ab46bbb62936350febad8e53f16cf1b31d872e8..f100b72ae7dd8862245b7b7d47672794c4d2ff80 100644 (file)
 #include "text-def.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
 
 
 void
 Text_spanner::set_support (Directional_spanner*d)
 {
   if (support_span_l_)
-       remove_dependency (support_span_l_);
+    remove_dependency (support_span_l_);
   
   support_span_l_ =d;
   add_dependency (d);
 }
+void
+Text_spanner::do_add_processing ()
+{
+  set_bounds (LEFT, support_span_l_->spanned_drul_[LEFT]);
+  set_bounds (RIGHT, support_span_l_->spanned_drul_[RIGHT]);
+}
 
 Text_spanner::Text_spanner()
 {
@@ -44,13 +50,13 @@ void
 Text_spanner::do_post_processing()
 {
   text_off_ = support_span_l_->center() +
-       Offset (0,support_span_l_->dir_i_ * paper()->internote_f () * 4); // todo
+       Offset (0,support_span_l_->dir_ * paper()->internote_f () * 4); // todo
 }
 
 Molecule*
 Text_spanner::brew_molecule_p() const
 {
-  Atom tsym (spec_p_->get_atom (paper(),0));
+  Atom tsym (spec_p_->get_atom (paper(),CENTER));
   tsym.translate (text_off_);
 
   Molecule*output = new Molecule;
@@ -61,13 +67,11 @@ Text_spanner::brew_molecule_p() const
 void
 Text_spanner::do_pre_processing()
 {
-  right_col_l_ = support_span_l_->right_col_l_;
-  left_col_l_ = support_span_l_->left_col_l_;
-  assert (left_col_l_ && right_col_l_);
+  spanned_drul_ = support_span_l_->spanned_drul_;
 }
 
 Interval
-Text_spanner::height()const
+Text_spanner::height() const
 {
   return brew_molecule_p()->extent ().y ();
 }