#include "dimen.hh"
Interval
-Text_def::width(Paper_def * p) const
+Text_def::width (Paper_def * p) const
{
- Atom a = get_atom(p,0);
+ Atom a = get_atom (p,0);
- Real guess_width_f = text_str_.length_i() * a.sym_.dim.x().length(); // ugh
- Interval i(0, guess_width_f);
+ Real guess_width_f = text_str_.length_i() * a.sym_.dim.x ().length (); // ugh
+ Interval i (0, guess_width_f);
i += - (align_i_ + 1)* i.center();
return i;
}
Text_def::do_print() const
{
#ifndef NPRINT
- mtor << "align " <<align_i_ << " `" << text_str_ << "'";
+ DOUT << "align " <<align_i_ << " `" << text_str_ << "'";
#endif
}
}
bool
-Text_def::do_equal_b(General_script_def const *gdef) const
+Text_def::do_equal_b (General_script_def const *gdef) const
{
Text_def const *def= (Text_def*)gdef;
return align_i_ == def->align_i_ && text_str_ == def->text_str_
}
Atom
-Text_def::get_atom(Paper_def *p, int ) const
+Text_def::get_atom (Paper_def *p, int) const
{
- return p->lookup_l()->text(style_str_, text_str_, -align_i_);
+ return p->lookup_l()->text (style_str_, text_str_, -align_i_);
}
void
Text_def::print() const
{
- mtor << "Text `" << text_str_ << "\', style " <<
+ DOUT << "Text `" << text_str_ << "\', style " <<
style_str_ << "align " << align_i_ << '\n';
}