#include <assert.h>
+#include "math/sizef.hpp"
#include "math/vector.hpp"
#include "object/anchor_point.hpp"
set_width(width);
set_height(height);
}
- Vector get_size()
+ Sizef get_size() const
{
- return Vector(get_width(), get_height());
+ return Sizef(get_width(), get_height());
}
void move(const Vector& v)
return ((v1 - v2).norm ());
}
+ Rectf grown(float border) const
+ {
+ return Rectf(p1.x - border, p1.y - border,
+ p2.x + border, p2.y + border);
+ }
+
// leave these two public to save the headaches of set/get functions for such
// simple things :)