#include <color.h>
Collaboration diagram for hoa_video::Color:

Public Member Functions | |
| Color (float r, float g, float b, float a) | |
| Color () | |
| float | GetAlpha () const |
| float | GetBlue () const |
| const float * | GetColors () const |
| Class member access functions. | |
| float | GetGreen () const |
| float | GetRed () const |
| void | SetAlpha (float a) |
| void | SetBlue (float b) |
| void | SetGreen (float g) |
| void | SetRed (float r) |
| Color | operator * (float f) const |
| Color | operator * (const Color &c) const |
| Color | operator *= (const Color &c) |
| bool | operator!= (const Color &c) const |
| Color | operator+ (const Color &c) const |
| bool | operator== (const Color &c) const |
| Overloaded Operators. | |
| const float & | operator[] (int32 i) const |
| float & | operator[] (int32 i) |
Static Public Attributes | |
| static Color | aqua |
| Aqua color (r=0.0, g=1.0, b=1.0, a=1.0). | |
| static Color | black |
| Black color (r=0.0, g=0.0, b=0.0, a=1.0). | |
| static Color | blue |
| Blue color (r=0.0, g=0.0, b=1.0, a=1.0). | |
| static Color | brown |
| Brown color (r=0.6, g=0.3, b=0.1, a=1.0). | |
| static Color | clear |
| Default colors for user convenience. These are defined in the file video.cpp. All colors are opaque (0.0f alpha value) except for "clear". Clear (transparent) color (r=0.0, g=0.0, b=0.0, a=0.0). | |
| static Color | gray |
| Gray color (r=0.5, g=0.5, b=0.5, a=1.0). | |
| static Color | green |
| Green color (r=0.0, g=1.0, b=0.0, a=1.0). | |
| static Color | orange |
| Orangecolor (r=1.0, g=0.4, b=0.0, a=1.0). | |
| static Color | red |
| Red color (r=1.0, g=0.0, b=0.0, a=1.0). | |
| static Color | violet |
| Violet color (r=1.0, g=0.0, b=1.0, a=1.0). | |
| static Color | white |
| White color (r=1.0, g=1.0, b=1.0, a=1.0). | |
| static Color | yellow |
| Yellow color (r=1.0, g=1.0, b=0.0, a=1.0). | |
Private Attributes | |
| float | _colors [4] |
| The four RGBA values that represent the color These values range from 0.0 to 1.0. The indeces of the array represent: red, green, blue, and alpha in that order. | |
****************************************************************************
This class encapsulates an array of 4 floats, and allows you to do basic operations like adding and multiplying colors.
Definition at line 30 of file color.h.
| hoa_video::Color::Color | ( | ) | [inline] |
Definition at line 50 of file color.h.
References _colors.
Referenced by operator *(), operator *=(), and operator+().
| hoa_video::Color::Color | ( | float | r, | |
| float | g, | |||
| float | b, | |||
| float | a | |||
| ) | [inline] |
| float hoa_video::Color::GetAlpha | ( | ) | const [inline] |
Definition at line 110 of file color.h.
References _colors.
Referenced by hoa_map::private_map::EnemySprite::Update().
| float hoa_video::Color::GetBlue | ( | ) | const [inline] |
| const float* hoa_video::Color::GetColors | ( | ) | const [inline] |
Class member access functions.
Definition at line 98 of file color.h.
References _colors.
Referenced by hoa_video::GameVideo::EnableFog().
| float hoa_video::Color::GetGreen | ( | ) | const [inline] |
| float hoa_video::Color::GetRed | ( | ) | const [inline] |
| Color hoa_video::Color::operator * | ( | float | f | ) | const [inline] |
| bool hoa_video::Color::operator!= | ( | const Color & | c | ) | const [inline] |
| bool hoa_video::Color::operator== | ( | const Color & | c | ) | const [inline] |
| const float& hoa_video::Color::operator[] | ( | int32 | i | ) | const [inline] |
| float& hoa_video::Color::operator[] | ( | int32 | i | ) | [inline] |
| void hoa_video::Color::SetAlpha | ( | float | a | ) | [inline] |
Definition at line 122 of file color.h.
References _colors.
Referenced by hoa_map::private_map::EnemySprite::ChangeStateHostile(), hoa_map::MapMode::Draw(), hoa_map::private_map::EnemySprite::Reset(), hoa_map::private_map::EnemySprite::Update(), and hoa_map::private_map::VirtualSprite::Update().
| void hoa_video::Color::SetBlue | ( | float | b | ) | [inline] |
| void hoa_video::Color::SetGreen | ( | float | g | ) | [inline] |
| void hoa_video::Color::SetRed | ( | float | r | ) | [inline] |
float hoa_video::Color::_colors[4] [private] |
The four RGBA values that represent the color These values range from 0.0 to 1.0. The indeces of the array represent: red, green, blue, and alpha in that order.
Definition at line 131 of file color.h.
Referenced by Color(), GetAlpha(), GetBlue(), GetColors(), GetGreen(), GetRed(), operator *(), operator *=(), operator!=(), operator+(), operator==(), operator[](), SetAlpha(), SetBlue(), SetGreen(), and SetRed().
Color hoa_video::Color::aqua [static] |
Color hoa_video::Color::black [static] |
Black color (r=0.0, g=0.0, b=0.0, a=1.0).
Definition at line 39 of file color.h.
Referenced by hoa_video::GameVideo::_GetTextShadowColor(), hoa_video::GameVideo::Clear(), and hoa_video::GameVideo::DrawText().
Color hoa_video::Color::blue [static] |
Color hoa_video::Color::brown [static] |
Color hoa_video::Color::clear [static] |
Default colors for user convenience. These are defined in the file video.cpp. All colors are opaque (0.0f alpha value) except for "clear". Clear (transparent) color (r=0.0, g=0.0, b=0.0, a=0.0).
Definition at line 36 of file color.h.
Referenced by hoa_video::GameVideo::LoadMenuSkin().
Color hoa_video::Color::gray [static] |
Gray color (r=0.5, g=0.5, b=0.5, a=1.0).
Definition at line 38 of file color.h.
Referenced by hoa_video::OptionBox::Draw().
Color hoa_video::Color::green [static] |
Color hoa_video::Color::orange [static] |
Color hoa_video::Color::red [static] |
Color hoa_video::Color::violet [static] |
Color hoa_video::Color::white [static] |
White color (r=1.0, g=1.0, b=1.0, a=1.0).
Definition at line 37 of file color.h.
Referenced by hoa_video::ImageDescriptor::_Clear(), hoa_video::GameVideo::_DrawStillImage(), hoa_video::GameVideo::_GetTextShadowColor(), hoa_video::AnimatedImage::Clear(), hoa_video::StillImage::Clear(), hoa_video::GameVideo::DisableSceneLighting(), hoa_video::private_video::ParticleSystem::Draw(), hoa_video::OptionBox::Draw(), hoa_video::MenuWindow::Draw(), hoa_video::private_video::GUISupervisor::DrawFPS(), hoa_video::GameVideo::DrawText(), hoa_video::ImageDescriptor::ImageDescriptor(), and hoa_video::private_video::ImageElement::ImageElement().
Color hoa_video::Color::yellow [static] |
1.5.1