* Added some of the rgb_color methods from Dano/Zeta.

* The private general_info structure is now setup - that fixes a part of bug #502;
  NetPositive's bar remains black, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17160 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-04-18 12:14:59 +00:00
parent 50f6c62f4b
commit cd0ea6ff0f
2 changed files with 29 additions and 7 deletions
+19
View File
@@ -80,6 +80,16 @@ typedef struct rgb_color {
#if defined(__cplusplus)
// some convenient additions
inline rgb_color&
set_to(uint8 r, uint8 g, uint8 b, uint8 a = 255)
{
red = r;
green = g;
blue = b;
alpha = a;
return *this;
}
inline bool
operator==(const rgb_color& other) const
{
@@ -94,6 +104,15 @@ typedef struct rgb_color {
#endif
} rgb_color;
#if defined(__cplusplus)
inline rgb_color
make_color(uint8 red, uint8 green, uint8 blue, uint8 alpha = 255)
{
rgb_color color = {red, green, blue, alpha};
return color;
}
#endif
//------------------------------------------------------------------------------
extern _IMPEXP_BE const rgb_color B_TRANSPARENT_COLOR;