GUIDOLib
1.7.7
A Music Score Rendering Engine
|
Go to the documentation of this file. 25 #define ALPHA_TRANSPARENT 0 26 #define ALPHA_OPAQUE 255 44 explicit VGColor(
const unsigned char col [4] )
45 {
if( col )
Set( col[0], col[1], col[2], col[3] );
else Set( 0 ); }
65 std::ostream&
print(std::ostream& out)
const 68 char prev = out.fill (
'0');
69 out.width(2);out << std::hex << int(
mRed);
70 out.width(2);out << std::hex << int(
mGreen);
71 out.width(2);out << std::hex << int(
mBlue);
72 out.width(1);out <<
"[";
73 out.width(2);out << std::hex << int(
mAlpha) << std::dec;
74 out.width(1);out <<
"]";
90 mRed = (
unsigned char)((sred > 255) ? 255 : sred);
92 mGreen = (
unsigned char)((sgreen > 255) ? 255 : sgreen);
93 int sblue =
mBlue + v;
94 mBlue = (
unsigned char)((sblue > 255) ? 255 : sblue);
100 return (&c)->print(out);
std::ostream & print(std::ostream &out) const
Definition: VGColor.h:65
VGColor & operator+=(short v)
Definition: VGColor.h:87
void Set(const VGColor &in)
Definition: VGColor.h:49
#define ALPHA_OPAQUE
Definition: VGColor.h:26
VGColor(int gray=0)
Definition: VGColor.h:37
bool operator==(const VGColor &col) const
Definition: VGColor.h:53
std::ostream & operator<<(std::ostream &out, const VGColor &c)
Definition: VGColor.h:98
int mGreen
Definition: VGColor.h:81
VGColor(const VGColor &in)
Definition: VGColor.h:39
VGColor(int r, int g, int b, int a=ALPHA_OPAQUE)
Definition: VGColor.h:41
VGColor(const unsigned char col [4])
Definition: VGColor.h:44
bool operator!=(const VGColor &col) const
Definition: VGColor.h:57
int mAlpha
Definition: VGColor.h:83
Generic class to manipulate device independant colors.
Definition: VGColor.h:34
void Set(int r, int g, int b, int a=ALPHA_OPAQUE)
Definition: VGColor.h:47
int mRed
Definition: VGColor.h:80
int mBlue
Definition: VGColor.h:82