29 #ifndef INCLUDED_SHAPES 30 #define INCLUDED_SHAPES 39 CColor(
float cr,
float cg,
float cb,
float ca) :
r(cr),
g(cg),
b(cb),
a(ca) {}
47 return !(*
this==color);
81 CRect(
const float l,
const float t,
const float r,
const float b);
87 CRect operator - (
void)
const;
88 CRect operator + (
void)
const;
97 void operator += (
const CRect& a);
98 void operator += (
const CPos& a);
99 void operator += (
const CSize& a);
100 void operator -= (
const CRect& a);
101 void operator -= (
const CPos& a);
102 void operator -= (
const CSize& a);
107 float GetWidth()
const;
112 float GetHeight()
const;
117 CSize GetSize()
const;
122 CPos TopLeft()
const;
127 CPos TopRight()
const;
132 CPos BottomLeft()
const;
137 CPos BottomRight()
const;
142 CPos CenterPoint()
const;
149 bool PointInside(
const CPos &point)
const;
151 CRect Scale(
float x,
float y)
const;
161 float left,
top, right, bottom;
174 CPos(
const float &_x,
const float &_y);
180 CPos operator - (
void)
const;
181 CPos operator + (
void)
const;
183 CPos operator + (
const CPos& a)
const;
185 CPos operator - (
const CPos& a)
const;
188 void operator += (
const CPos& a);
189 void operator += (
const CSize& a);
190 void operator -= (
const CPos& a);
191 void operator -= (
const CSize& a);
213 CSize(
const float &_cx,
const float &_cy);
219 CSize operator - (
void)
const;
220 CSize operator + (
void)
const;
224 CSize operator / (
const float &a)
const;
225 CSize operator * (
const float &a)
const;
227 void operator += (
const CSize& a);
228 void operator -= (
const CSize& a);
229 void operator /= (
const float& a);
230 void operator *= (
const float& a);
240 #endif // INCLUDED_SHAPES Made to represent a screen size, should in philosophy be made of unsigned ints, but for the sake of c...
Definition: Shapes.h:207
float g
Definition: Shapes.h:59
float top
Definition: Shapes.h:161
bool ParseString(const CStr8 &Value, int DefaultAlpha=255)
Try to parse Value as a color.
Definition: Shapes.cpp:35
uint8_t u8
Definition: types.h:37
SColor4ub AsSColor4ub() const
Definition: Shapes.h:54
float b
Definition: Shapes.h:59
Config::Value_type Value
Definition: json_spirit_value.h:181
CColor()
Definition: Shapes.h:38
float a
Definition: Shapes.h:59
bool operator!=(const CColor &color) const
Definition: Shapes.h:45
Made to represent screen positions and delta values.
Definition: Shapes.h:169
bool operator==(const CColor &color) const
Definition: Shapes.cpp:83
const float * FloatArray() const
Definition: Shapes.h:51
CColor(float cr, float cg, float cb, float ca)
Definition: Shapes.h:39
float y
Definition: Shapes.h:197
float cy
Definition: Shapes.h:236
float r
Definition: Shapes.h:59
Rectangle class used for screen rectangles.
Definition: Shapes.h:73