____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <color.h>
Public Member Functions | |
| Color () | |
| Color (int color) | |
| Color (int r, int g, int b, int a=255) | |
| Color | operator+ (const Color &color) const |
| Color | operator- (const Color &color) const |
| Color | operator* (float value) const |
| bool | operator== (const Color &color) const |
| bool | operator!= (const Color &color) const |
Public Attributes | |
| int | r |
| int | g |
| int | b |
| int | a |
Definition at line 65 of file color.h.
| gcn::Color::Color | ( | ) |
| gcn::Color::Color | ( | int | color | ) |
Constructs a color from the bytes in an integer. Call it with a hexadecimal constant for HTML-style color representation. The alpha component will be set to 255.
EXAMPLE: Color(0xff50a0) constructs Gui-chan's favourite color.
NOTE: Because of this constructor, integers will be automatically casted to a color by your compiler.
| color | the color. |
| gcn::Color::Color | ( | int | r, | |
| int | g, | |||
| int | b, | |||
| int | a = 255 | |||
| ) |
| Color gcn::Color::operator* | ( | float | value | ) | const |
| bool gcn::Color::operator== | ( | const Color & | color | ) | const |
| bool gcn::Color::operator!= | ( | const Color & | color | ) | const |
| int gcn::Color::r |
Red color component (range 0-255).
Definition at line 143 of file color.h.
Referenced by Color(), gcn::SDLGraphics::drawHLine(), MyOpenGLGraphics::drawLine(), MyOpenGLGraphics::drawPoint(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawVLine(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), operator!=(), operator*(), operator+(), operator-(), operator==(), gcn::SDLputPixel(), and gcn::SDLputPixelAlpha().
| int gcn::Color::g |
Green color component (range 0-255).
Definition at line 148 of file color.h.
Referenced by Color(), gcn::SDLGraphics::drawHLine(), MyOpenGLGraphics::drawLine(), MyOpenGLGraphics::drawPoint(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawVLine(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), operator!=(), operator*(), operator+(), operator-(), operator==(), gcn::SDLputPixel(), and gcn::SDLputPixelAlpha().
| int gcn::Color::b |
Blue color component (range 0-255).
Definition at line 153 of file color.h.
Referenced by Color(), gcn::SDLGraphics::drawHLine(), MyOpenGLGraphics::drawLine(), MyOpenGLGraphics::drawPoint(), MyOpenGLGraphics::drawRectangle(), gcn::SDLGraphics::drawVLine(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), operator!=(), operator*(), operator+(), operator-(), operator==(), gcn::SDLputPixel(), and gcn::SDLputPixelAlpha().
| int gcn::Color::a |
Color alpha, used for transparency. A value of 0 means totaly transparent, 255 is totaly opaque (the default)
Definition at line 159 of file color.h.
Referenced by Color(), gcn::Window::draw(), gcn::Slider::draw(), gcn::ScrollArea::draw(), gcn::DropDown::draw(), gcn::Button::draw(), gcn::Window::drawBorder(), MultiLineLabel::drawBorder(), gcn::TextField::drawBorder(), gcn::Slider::drawBorder(), gcn::ScrollArea::drawBorder(), gcn::RadioButton::drawBorder(), gcn::ListBox::drawBorder(), gcn::Label::drawBorder(), gcn::Icon::drawBorder(), gcn::DropDown::drawBorder(), gcn::Container::drawBorder(), gcn::CheckBox::drawBorder(), gcn::Button::drawBorder(), gcn::RadioButton::drawBox(), gcn::CheckBox::drawBox(), gcn::DropDown::drawButton(), gcn::ScrollArea::drawDownButton(), gcn::ScrollArea::drawHBar(), gcn::SDLGraphics::drawHLine(), gcn::ScrollArea::drawHMarker(), gcn::ScrollArea::drawLeftButton(), MyOpenGLGraphics::drawLine(), gcn::Slider::drawMarker(), MyOpenGLGraphics::drawPoint(), MyOpenGLGraphics::drawRectangle(), gcn::ScrollArea::drawRightButton(), gcn::ScrollArea::drawUpButton(), gcn::ScrollArea::drawVBar(), gcn::SDLGraphics::drawVLine(), gcn::ScrollArea::drawVMarker(), MyOpenGLGraphics::fillRectangle(), gcn::SDLGraphics::fillRectangle(), operator!=(), operator*(), operator+(), operator-(), operator==(), gcn::SDLputPixelAlpha(), and gcn::SDLGraphics::setColor().
1.5.6