22 #include "precompiled.h"
33 CParser& parser (
CParserCache::Get(
"_[-$arg(_minus)]$value_[-$arg(_minus)]$value_[-$arg(_minus)]$value_[[-$arg(_minus)]$value_]"));
35 std::string str = Value;
44 float values[4] = { 0, 0, 0, DefaultAlpha };
76 left(0.f), top(0.f), right(0.f), bottom(0.f)
81 left(pos.x), top(pos.y), right(pos.x), bottom(pos.y)
86 left(0.f), top(0.f), right(size.cx), bottom(size.cy)
91 left(upperleft.x), top(upperleft.y), right(bottomright.x), bottom(bottomright.y)
96 left(pos.x), top(pos.y), right((pos.x+size.cx)), bottom((pos.y+size.cy))
100 CRect::CRect(
const float l,
const float t,
const float r,
const float b) :
101 left(l), top(t), right(r), bottom(b)
274 return (point.
x >=
left &&
310 return (
x==a.
x &&
y==a.
y);
CSize operator-(void) const
CSize & operator=(const CSize &a)
CSize operator/(const float &a) const
Made to represent a screen size, should in philosophy be made of unsigned ints, but for the sake of c...
CPos CenterPoint() const
Get Position equivalent to the center of the rectangle.
CPos TopRight() const
Get Position equivalent to top/right corner.
float left
Returning CPos representing each corner.
void operator*=(const float &a)
bool GetArgFloat(size_t arg, float &ret)
CSize GetSize() const
Get Size.
void operator-=(const CRect &a)
void operator/=(const float &a)
void operator+=(const CPos &a)
CRect Scale(float x, float y) const
bool operator!=(const CSize &a) const
bool operator!=(const CPos &a) const
bool ParseString(const CStr8 &Value, float DefaultAlpha)
CSize operator*(const float &a) const
CPos BottomLeft() const
Get Position equivalent to bottom/left corner.
void operator+=(const CSize &a)
void operator-=(const CSize &a)
CPos BottomRight() const
Get Position equivalent to bottom/right corner.
CRect operator+(void) const
Made to represent screen positions and delta values.
bool ParseString(const CParser &parser, const std::string &line)
bool operator==(const CSize &a) const
bool operator==(const CColor &color) const
CPos & operator=(const CPos &a)
static CParser & Get(const char *str)
CPos operator-(void) const
CRect operator-(void) const
size_t GetArgCount() const
void operator-=(const CPos &a)
CSize operator+(void) const
void operator+=(const CRect &a)
CPos operator+(void) const
bool PointInside(const CPos &point) const
Evalutates if point is within the rectangle.
bool operator==(const CRect &a) const
CRect & operator=(const CRect &a)
CPos TopLeft() const
Get Position equivalent to top/left corner.
bool operator==(const CPos &a) const
bool operator!=(const CRect &a) const
Rectangle class used for screen rectangles.