* 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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user