X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Finclude%2Fbox.hh;h=d4a8655a429b0cf965364132871cf2b7f9c3b054;hb=bf14e3a7d89454c17f65b291d192d05752afad27;hp=ab0d3f5300b614211adf9c8f0a18a91f2e3e686c;hpb=cb951038d3e74a85ec8539d0dc51260088251556;p=lilypond.git diff --git a/lily/include/box.hh b/lily/include/box.hh index ab0d3f5300..d4a8655a42 100644 --- a/lily/include/box.hh +++ b/lily/include/box.hh @@ -9,10 +9,12 @@ #include "offset.hh" #include "smobs.hh" -class Box +class Box : public Simple_smob { +public: + static const char * const 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]; } @@ -21,6 +23,8 @@ public: 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; @@ -32,11 +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); }; -DECLARE_UNSMOB (Box, box); #endif