]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/box.hh
* lily/include/audio-column.hh: remove unused variables.
[lilypond.git] / lily / include / box.hh
1 /*
2     some 2D geometrical concepts
3 */
4
5 #ifndef BOXES_HH
6 #define BOXES_HH
7
8 #include "flower-proto.hh"
9 #include "real.hh"
10 #include "interval.hh"
11 #include "offset.hh"
12
13 struct Box
14 {
15   Interval interval_a_[NO_AXES];
16     
17   Interval &x () {return interval_a_[X_AXIS]; }
18   Interval &y (){ return interval_a_[Y_AXIS]; }
19   Interval x () const{ return interval_a_[X_AXIS]; }
20   Interval y () const{return interval_a_[Y_AXIS]; }
21   Interval operator[] (Axis a) const;
22   Interval &operator[] (Axis a);
23
24   Offset center () const;
25     
26   void translate (Offset o);
27   /// smallest box enclosing #b#
28   void set_empty ();
29   void add_point (Offset);
30   void widen (Real x, Real y);
31   void scale (Real r);
32   void unite (Box b);
33   Box ();
34   Box (Interval ix, Interval iy);
35 };
36
37
38 #endif