csRGBcolor Struct Reference
[Graphics]
An RGB color.
More...
#include <csgfx/rgbpixel.h>
Public Member Functions | |
| csRGBcolor (unsigned char r, unsigned char g, unsigned char b) | |
| Initialize the color with some R/G/B value. | |
| csRGBcolor () | |
| Constructor (initialize to zero). | |
| bool | operator!= (const csRGBcolor &c) const |
| Compare with an csRGBcolor. | |
| csRGBcolor | operator+ (const csRGBcolor &c) const |
| Add two csRGBcolors (may overflow!). | |
| bool | operator== (const csRGBcolor &c) const |
| Compare with an csRGBcolor. | |
| void | SafeAdd (const csRGBcolor &c) |
| Use this in the general case. | |
| void | Set (unsigned char r, unsigned char g, unsigned char b) |
| Assign given red/green/blue values to this pixel. | |
| void | UnsafeAdd (const csRGBcolor &c) |
| Use this only if you know there is no overflow. | |
Public Attributes | |
| unsigned char | red |
| The red, green, blue components. | |
Detailed Description
An RGB color.This class is used whenever we need just R, G and B information, such as when defining a color palette.
Definition at line 67 of file rgbpixel.h.
Constructor & Destructor Documentation
| csRGBcolor::csRGBcolor | ( | ) | [inline] |
| csRGBcolor::csRGBcolor | ( | unsigned char | r, | |
| unsigned char | g, | |||
| unsigned char | b | |||
| ) | [inline] |
Member Function Documentation
| bool csRGBcolor::operator!= | ( | const csRGBcolor & | c | ) | const [inline] |
| csRGBcolor csRGBcolor::operator+ | ( | const csRGBcolor & | c | ) | const [inline] |
| bool csRGBcolor::operator== | ( | const csRGBcolor & | c | ) | const [inline] |
| void csRGBcolor::SafeAdd | ( | const csRGBcolor & | c | ) | [inline] |
Use this in the general case.
This version test for overflow.
Definition at line 103 of file rgbpixel.h.
| void csRGBcolor::Set | ( | unsigned char | r, | |
| unsigned char | g, | |||
| unsigned char | b | |||
| ) | [inline] |
| void csRGBcolor::UnsafeAdd | ( | const csRGBcolor & | c | ) | [inline] |
Member Data Documentation
| unsigned char csRGBcolor::red |
The documentation for this struct was generated from the following file:
- csgfx/rgbpixel.h
Generated for Crystal Space 1.4.0 by doxygen 1.5.8
