47 VDKRgb(
int r = 0,
int g = 0,
int b = 0): red(r),green(g),blue(b)
63 red = green = blue = -1;
65 if(gdk_color_parse(name, &color))
68 green = color.green >> 8;
69 blue = color.blue >> 8;
75 bool IsValid()
const {
return red != -1 && green != -1 && blue != -1 ; }
81 return ( (red == c.red) && (green == c.green) && (blue == c.blue) );
156 X()
const {
return x; }
158 Y()
const {
return y; }
190 left = top = right = bottom =
w = h = 0;
201 left = x; top = y; right = x+_w; bottom = y+_h;
208 left = r.
left; right = r.right; top = r.top; bottom = r.bottom;
225 W()
const {
return w; }
230 H()
const {
return h; }
238 return point.X() >=
left && point.X() < right
239 && point.Y() >= top && point.Y() < bottom;
247 return r.
left >=
left && r.right <= right
248 && r.top >= top && r.bottom <= bottom;
Hierarchy root class.
Definition: vdkutils.h:264
Provides a simple point object.
Definition: vdkutils.h:94
VDKPoint OffsetBy(int dx, int dy) const
Definition: vdkutils.h:141
int operator!=(VDKPoint &p) const
Definition: vdkutils.h:134
int operator==(VDKPoint &p) const
Definition: vdkutils.h:129
VDKPoint(int _x, int _y)
Definition: vdkutils.h:113
VDKPoint operator-() const
Definition: vdkutils.h:146
virtual ~VDKPoint()
Definition: vdkutils.h:121
VDKPoint()
Definition: vdkutils.h:105
int x
Definition: vdkutils.h:99
VDKPoint & Offset(int dx, int dy)
Provides a simple rectangle object.
Definition: vdkutils.h:171
int left
Definition: vdkutils.h:177
VDKRect(int x, int y, int _w, int _h)
Definition: vdkutils.h:199
int w
Definition: vdkutils.h:181
int Contains(const VDKRect &r) const
Definition: vdkutils.h:246
VDKRect()
Definition: vdkutils.h:188
VDKPoint Origin() const
Definition: vdkutils.h:220
~VDKRect()
Definition: vdkutils.h:213
int Contains(const VDKPoint &point) const
Definition: vdkutils.h:236
int W() const
Definition: vdkutils.h:225
VDKRect(VDKRect &r)
Definition: vdkutils.h:206
int H() const
Definition: vdkutils.h:230
Provides a simple RGB color structure.
Definition: vdkutils.h:38
bool operator==(VDKRgb &c) const
Definition: vdkutils.h:79
VDKRgb(char *name)
Definition: vdkutils.h:61
~VDKRgb()
Definition: vdkutils.h:53
bool IsValid() const
Definition: vdkutils.h:75
VDKRgb(int r=0, int g=0, int b=0)
Definition: vdkutils.h:47