#define DCPOMATIC_RECT_H
#include "position.h"
+#include <algorithm>
/* Put this inside a namespace as Apple put a Rect in the global namespace */
namespace dcpomatic
{
-
+
/** @struct Rect
* @brief A rectangle.
*/
-template <class T>
+template <class T>
class Rect
{
public:
-
+
Rect ()
: x (0)
, y (0)
{
T const tx = max (x, other.x);
T const ty = max (y, other.y);
-
+
return Rect (
tx, ty,
min (x + width, other.x + other.width) - tx,