Gnash
0.8.10
|
A basic RGBA type. More...
#include <RGBA.h>
Public Member Functions | |
rgba () | |
Construct default RGBA value. | |
rgba (boost::uint8_t r, boost::uint8_t g, boost::uint8_t b, boost::uint8_t a) | |
Construct an RGBA with the provided values. | |
void | parseRGB (boost::uint32_t rgbCol) |
Parse a 32-bit unsigned integer as three packed R,G,B bytes. | |
boost::uint32_t | toRGB () const |
Return a 32-bit unsigned integer as four packed R,G,B bytes. | |
boost::uint32_t | toRGBA () const |
Return a 32-bit unsigned integer as four packed A,R,G,B bytes. | |
bool | operator== (const rgba &o) const |
bool | operator!= (const rgba &o) const |
Public Attributes | |
boost::uint8_t | m_r |
boost::uint8_t | m_g |
boost::uint8_t | m_b |
boost::uint8_t | m_a |
Friends | |
std::ostream & | operator<< (std::ostream &os, const rgba &r) |
A basic RGBA type.
This both represents a SWF RGBA record and is a basic Gnash type for color values.
gnash::rgba::rgba | ( | ) | [inline] |
Construct default RGBA value.
Default value is 0xffffffff (solid white).
gnash::rgba::rgba | ( | boost::uint8_t | r, |
boost::uint8_t | g, | ||
boost::uint8_t | b, | ||
boost::uint8_t | a | ||
) | [inline] |
Construct an RGBA with the provided values.
r | Red |
g | Green |
b | Blue |
a | Alpha (transparency) |
bool gnash::rgba::operator!= | ( | const rgba & | o | ) | const [inline] |
References gnash::key::o.
void gnash::rgba::parseRGB | ( | boost::uint32_t | rgbCol | ) | [inline] |
Parse a 32-bit unsigned integer as three packed R,G,B bytes.
Alpha will be untouched. Blue is the least significant byte.
This function is meant to be used to parse ActionScript colors in numeric format.
Referenced by gnash::colorFromHexString(), and gnash::StaticText::setSelectionColor().
boost::uint32_t gnash::rgba::toRGB | ( | ) | const [inline] |
Return a 32-bit unsigned integer as four packed R,G,B bytes.
Blue is the least significant byte. The most significant (alpha) byte is unused.
This function is meant to be used to output ActionScript colors in numeric format.
boost::uint32_t gnash::rgba::toRGBA | ( | ) | const [inline] |
Return a 32-bit unsigned integer as four packed A,R,G,B bytes.
Blue is the least significant byte.
This function is meant to be used to output ActionScript colors in numeric format.
std::ostream& operator<< | ( | std::ostream & | os, |
const rgba & | r | ||
) | [friend] |
boost::uint8_t gnash::rgba::m_a |
Referenced by gnash::movie_root::set_background_color(), gnash::movie_root::set_background_alpha(), gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap(), gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::Renderer_cairo::set_color(), gnash::Renderer_cairo::begin_display(), gnash::Renderer_cairo::draw_poly(), gnash::Renderer_cairo::getPixel(), gnash::lerp(), gnash::operator<<(), operator==(), gnash::SWFCxForm::transform(), and gnash::SWF::TextRecord::displayRecords().
boost::uint8_t gnash::rgba::m_b |
Referenced by gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap(), gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap(), gnash::renderer::openvg::Renderer_ovg::drawLine(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::Renderer_cairo::set_color(), gnash::Renderer_cairo::getPixel(), gnash::lerp(), gnash::operator<<(), operator==(), and gnash::SWFCxForm::transform().
boost::uint8_t gnash::rgba::m_g |
Referenced by gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap(), gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap(), gnash::renderer::openvg::Renderer_ovg::drawLine(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::Renderer_cairo::set_color(), gnash::Renderer_cairo::getPixel(), gnash::lerp(), gnash::operator<<(), operator==(), and gnash::SWFCxForm::transform().
boost::uint8_t gnash::rgba::m_r |
Referenced by gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap(), gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap(), gnash::renderer::openvg::Renderer_ovg::drawLine(), gnash::renderer::openvg::Renderer_ovg::draw_poly(), gnash::renderer::openvg::StyleHandler::operator()(), gnash::AddStyles::operator()(), gnash::Renderer_cairo::set_color(), gnash::Renderer_cairo::getPixel(), gnash::lerp(), gnash::operator<<(), operator==(), and gnash::SWFCxForm::transform().