2 atom.cc -- implement Atom
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
12 #include "interval.hh"
13 #include "dimension.hh"
20 Atom::check_infinity_b ()const
22 bool ridiculous = false;
25 /* infinity checks. */
26 for (int a = X_AXIS; a < NO_AXES; a++)
29 if (abs (off_[ax]) >= 100 CM)
31 warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
32 print_dimen(off_[ax])));
34 if (experimental_features_global_b)
37 ((Atom*)this)->off_[ax] = 0.0;
50 DOUT << "texstring: " << tex_ << '\n';
53 for (Axis i=X_AXIS; i < NO_AXES; incr(i))
54 DOUT << axis_name_str(i) << " = " << dim_[i].str();
56 DOUT << "\noffset: " << off_.str ();
70 : dim_ (Interval (0,0),Interval (0,0))
75 Atom::Atom (String s, Box b)
85 return String ("Atom (\'") + tex_ + "\', (" + dim_.x().str () + ", "
86 + dim_.y ().str () + "))";
98 Atom::translate_axis (Real r, Axis a)
105 Atom::translate (Offset o)