]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/atom.cc
release: 1.1.1
[lilypond.git] / lily / atom.cc
index ff2e75626aa6c0e45d4137d238d94ef55509d8d3..ae6092c165e628f28185ed7bc7c5944cf73dc5fd 100644 (file)
@@ -6,14 +6,13 @@
   (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-
 #include "atom.hh"
-#include "tex.hh"
 #include "interval.hh"
-#include "dimension.hh"
 #include "string.hh"
 #include "array.hh"
 #include "debug.hh"
+#include "dimensions.hh"
+#include "lookup.hh"
 #include "main.hh"
 
 inline bool
@@ -66,6 +65,7 @@ Atom::extent () const
 }
 
 
+
 Atom::Atom ()
   : dim_ (Interval (0,0),Interval (0,0))
 {
@@ -76,13 +76,15 @@ Atom::Atom ()
     But Atom is used as a simple type *everywhere*,
     and we don't have virtual contructors.
    */
-  str_ = ps_output_global_b ? "unknown" : "\\unknown";
+  str_ = "unknown\n";
+  origin_l_ = 0;
 }
 
 Atom::Atom (String s, Box b)
   :  dim_ (b)
 {
   str_ = s;
+  origin_l_ = 0;  
 }
 
 
@@ -99,8 +101,6 @@ Atom::offset () const
   return off_;
 }
 
-
-
 void
 Atom::translate_axis (Real r, Axis a)
 {
@@ -114,3 +114,9 @@ Atom::translate (Offset o)
   off_ += o;
   check_infinity_b ();
 }
+
+bool
+Atom::empty() const
+{
+  return (dim_.y().length() == 0);
+}