2 atom.cc -- implement Atom
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "interval.hh"
20 DOUT << "texstring: " <<tex_<<"\n";
23 for (Axis i=X_AXIS; i < NO_AXES; incr(i))
24 DOUT << axis_name_str(i) << " = " << dim_[i].str();
26 DOUT << "\noffset: " << off_.str ();
40 : dim_ (Interval (0,0),Interval (0,0))
45 Atom::Atom (String s, Box b)
55 return "Atom (\'"+tex_+"\', (" + dim_.x().str () + ", "
56 + dim_.y ().str () + "))";
60 Atom::TeX_string() const
62 String tex_str = tex_;
65 /* infinity checks. */
66 for (int a = X_AXIS; a < NO_AXES; a++)
69 if (abs (off[ax]) >= 100 CM)
71 warning (_("ridiculous dimension ") + axis_name_str (ax) + ", "
72 +print_dimen(off[ax]));
74 tex_str += "\errormark";
77 // whugh.. Hard coded...
78 String s ("\\placebox{");
79 s += print_dimen (off[Y_AXIS])+"}{";
80 s += print_dimen (off[X_AXIS]) + "}{";
86 Atom::translate_axis (Real r, Axis a)
92 Atom::translate (Offset o)