#include <cvideo.h>
Public Member Functions | |
| CColor (uint32 n_color=0) | |
| CColor (uint8 r, uint8 g, uint8 b) | |
| operator uint32 () const | |
Note that this class isn't abstract, partially for performance reasons; making it abstract would require a vtable, increasing the size of the color, and virtual functions would slow down the methods of a class that is probably going to be used quite a bit. Most of all, however, this is the kind of structure that really doesn't have much of an actual need *need* to have multiple implementations, and it's easier to have the class just ask the video system manager for architecture-specific concerns than it is to subclass the color object in every concrete video driver implementation.
Definition at line 198 of file cvideo.h.
|
|
Create a color with the given surface-specific color value (i.e., the CColor object doesn't ask the CVideoSystem anything about conversion, it just stores the given number directly). |
|
||||||||||||||||
|
Creates a new color with the given red, green, and blue components (from 0-255), creating the 32-bit color value by asking the CVideoSystem to make it for us. Definition at line 212 of file cvideo.h. References CSingletonManager< CVideoSystem >::get_instance(), and CVideoSystem::make_color(). |
Here is the call graph for this function:

|
|
Automatic type conversion for return the integral color value. |
1.3.3