3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
17 * A simple class representing rectangular regions.
18 * It is expected that the box be constructed in
19 * normalised form, that is to say : x1,y1 is top-left,
20 * x2,y2 is bottom-right.
28 Box(unsigned int x1_, unsigned int x2_,
29 unsigned int y1_, unsigned int y2_) :
30 x1(x1_), x2(x2_), y1(y1_), y2(y2_) {}
33 * Returns true if the given co-ordinates are within
34 * the box. Check is exclusive (point on a border
37 bool contained(unsigned int x, unsigned int y) {
38 return (x1 < x && x2 > x &&