]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/box.hh
Merge branch 'master' into translation
[lilypond.git] / lily / include / box.hh
index af5695b3bce8f64978a623c4d16b56dea054b7a4..7d5745d6965b757123606d33b4b25edf64dc1779 100644 (file)
@@ -9,10 +9,12 @@
 #include "offset.hh"
 #include "smobs.hh"
 
-class Box
+class Box : public Simple_smob<Box>
 {
+public:
+  static const char type_p_name_[];
+private:
   Interval interval_a_[NO_AXES];
-  DECLARE_SIMPLE_SMOBS (Box);
 public:
   Interval &x () {return interval_a_[X_AXIS]; }
   Interval &y () { return interval_a_[Y_AXIS]; }
@@ -20,6 +22,9 @@ public:
   Interval y () const {return interval_a_[Y_AXIS]; }
   Interval operator [] (Axis a) const;
   Interval &operator [] (Axis a);
+  Real area () const;
+  bool is_empty () const;
+  bool is_empty (Axis a) const;
 
   Offset center () const;
 
@@ -31,9 +36,11 @@ public:
   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);
 };
 
+
 #endif