]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/box.hh
lilypond-book: Textwidth detection with included file (issue 3136).
[lilypond.git] / lily / include / box.hh
index 813e6989532adabf155fb02a6848d543fb3e8c1e..63224f2f880debeb58567524dfb7dac51e1ae6a4 100644 (file)
 class Box
 {
   Interval interval_a_[NO_AXES];
-  DECLARE_SIMPLE_SMOBS(Box,);
+  DECLARE_SIMPLE_SMOBS (Box);
 public:
   Interval &x () {return interval_a_[X_AXIS]; }
-  Interval &y (){ return interval_a_[Y_AXIS]; }
-  Interval x () const{ return interval_a_[X_AXIS]; }
-  Interval y () const{return interval_a_[Y_AXIS]; }
+  Interval &y () { return interval_a_[Y_AXIS]; }
+  Interval x () const { return interval_a_[X_AXIS]; }
+  Interval y () const {return interval_a_[Y_AXIS]; }
   Interval operator [] (Axis a) const;
   Interval &operator [] (Axis a);
+  Real area () const;
+  bool is_empty () const;
 
   Offset center () const;
 
   void translate (Offset o);
+
   /// smallest box enclosing #b#
   void set_empty ();
   void add_point (Offset);
   void widen (Real x, Real y);
   void scale (Real r);
   void unite (Box b);
+  void intersect (Box b);
+  void print ();
   Box ();
   Box (Interval ix, Interval iy);
 };
 
+DECLARE_UNSMOB (Box, box);
+
 #endif