Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Color
- {
- int _color[4];
- public:
- Color( )
- {
- _SetColor( 0, 0, 0, 0 );
- }
- Color( int r, int g, int b, int a = 255 )
- {
- _SetColor( r, g, b, a );
- }
- void SetColor( int r, int g, int b )
- {
- _SetColor( r, g, b );
- }
- __inline int _r( ) const { return _color[0]; }
- __inline int _g( ) const { return _color[1]; }
- __inline int _b( ) const { return _color[2]; }
- __inline int _a( ) const { return _color[3]; }
- private:
- void _SetColor( int r, int g, int b, int a = 255 )
- {
- _color[0] = r;
- _color[1] = g;
- _color[2] = b;
- _color[3] = a;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement