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>
10 #include "interval.hh"
14 #include "dimensions.hh"
19 Atom::check_infinity_b ()const
21 bool ridiculous = false;
24 /* infinity checks. */
25 for (int a = X_AXIS; a < NO_AXES; a++)
28 if (abs (off_[ax]) >= 100 CM)
30 warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
31 print_dimen (off_[ax])));
33 if (experimental_features_global_b)
36 ( (Atom*)this)->off_[ax] = 0.0;
49 DOUT << "string: " << str_ << '\n';
52 for (Axis i=X_AXIS; i < NO_AXES; incr (i))
53 DOUT << axis_name_str (i) << " = " << dim_[i].str ();
55 DOUT << "\noffset: " << off_.str ();
70 : dim_ (Interval (0,0),Interval (0,0))
76 Atom::Atom (String s, Box b)
87 return String ("Atom (\'") + str_ + "\', (" + dim_.x ().str () + ", "
88 + dim_.y ().str () + "))";
99 Atom::translate_axis (Real r, Axis a)
106 Atom::translate (Offset o)
115 return (dim_.y().length() == 0);