12 bool Region::overlappedBy(Region& d)
31 Region Region::subtract(Region& other)
33 OK printf("This: %i %i %i %i\n", x, y, w, h);
34 OK printf("Subtract this: %i %i %i %i\n", other.x, other.y, other.w, other.h);
47 else if (x2() > other.x2())
63 else if (y2() > other.y2())
78 OK printf("Result: %i %i %i %i\n", s.x, s.y, s.w, s.h);
84 //i.x = (x >= other.x ? x : other.x);
85 //i.y = (y >= other.y ? y : other.y);
86 //i.w = (x2() <= other.x2() ? x2() : other.x2()) - i.x;
87 //i.h = (y2() <= other.y2() ? y2() : other.y2()) - i.y;