2 atom.cc -- implement Atom
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "interval.hh"
18 Atom::check_infinity_b ()const
20 bool ridiculous = false;
23 /* infinity checks. */
24 for (int a = X_AXIS; a < NO_AXES; a++)
27 if (abs (off_[ax]) >= 100 CM)
29 warning (_("ridiculous dimension ") + axis_name_str (ax) + ", "
30 +print_dimen(off_[ax]));
32 if (experimental_features_global_b)
35 ((Atom*)this)->off_[ax] = 0.0;
48 DOUT << "texstring: " <<tex_<<"\n";
51 for (Axis i=X_AXIS; i < NO_AXES; incr(i))
52 DOUT << axis_name_str(i) << " = " << dim_[i].str();
54 DOUT << "\noffset: " << off_.str ();
68 : dim_ (Interval (0,0),Interval (0,0))
73 Atom::Atom (String s, Box b)
83 return "Atom (\'"+tex_+"\', (" + dim_.x().str () + ", "
84 + dim_.y ().str () + "))";
89 Atom::TeX_string() const
91 String tex_str = tex_;
92 if (check_infinity_b ())
93 tex_str += "\errormark";
95 // whugh.. Hard coded...
96 String s ("\\placebox{");
97 s += print_dimen (off_[Y_AXIS])+"}{";
98 s += print_dimen (off_[X_AXIS]) + "}{";
104 Atom::translate_axis (Real r, Axis a)
111 Atom::translate (Offset o)