25 using namespace basis;
34 screen_point::screen_point(
const tagPOINT &original) : point<int>(original.x, original.y) {}
36 screen_point::operator tagPOINT()
37 { POINT to_return; to_return.x = x(); to_return.y = y();
return to_return; }
69 :
rectangle<int>(original.left, original.top, original.right, original.bottom)
72 screen_rectangle::operator tagRECT()
const
74 RECT to_return; to_return.left = left();
75 to_return.top = top(); to_return.right = right();
76 to_return.bottom = bottom();
return to_return;
point< numeric_type > top_left() const
point< numeric_type > bottom_left() const
point< numeric_type > bottom_right() const
returns the appropriate point as represented by our rectangle.
point< numeric_type > top_right() const
a simple class used to describe points on a graphics screen.
Represents a rectangle as interpreted on display screens.
screen_point bottom_right() const
screen_point bottom_left() const
screen_point top_left() const
screen_point top_right() const
screen_rectangle order() const
Re-orders the vertices to match expectations.
screen_rectangle(const screen_point &vertex_1, const screen_point &vertex_2)
The guards collection helps in testing preconditions and reporting errors.
Contains all of our objects for geometry and avoids name clashes.
const screen_point & screen_origin()
the origin of the screen coordinate system (which is top-left here).
#define SAFE_STATIC_CONST(type, func_name, parms)
this version returns a constant object instead.