]> Shamusworld >> Repos - architektonas/blobdiff - src/rect.h
Added object pane, grouping, load/save functionality.
[architektonas] / src / rect.h
diff --git a/src/rect.h b/src/rect.h
new file mode 100644 (file)
index 0000000..0a8478a
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef __RECT_H__
+#define __RECT_H__
+
+//
+// We're doing this because the Qt implementation is non-Cartesian compliant.
+// Also, it auto-normalizes rects constructed using the constructors. :-)
+//
+
+#include "vector.h"
+
+struct Rect
+{
+       double l, r, t, b;
+
+       Rect();
+       Rect(double ll, double rr, double tt, double bb);
+       Rect(Point tl, Point br);
+       Rect & operator*=(double scale);
+       Rect & operator|=(Rect x);
+       void Normalize(void);
+       void Translate(Point p);
+       void Expand(double amt);
+};
+
+#endif // __RECT_H__
+