Color Transformation Record. More...
#include <cxform.h>
Public Member Functions | |
cxform () | |
Initialize to the identity color transform (no transform). | |
void | concatenate (const cxform &c) |
Concatenate cxform c onto ours. | |
rgba | transform (const rgba &in) const |
Transform the given color, return the result. | |
void | transform (boost::uint8_t &r, boost::uint8_t &g, boost::uint8_t &b, boost::uint8_t &a) const |
Transform the given color. | |
void | store_to (boost::int16_t *dst) const |
Store the cxform record to an external array. | |
cxform & | load_from (float *src) |
Load an cxform record from an external array. | |
bool | is_identity () const |
Returns true when the cxform equals identity (no transform). | |
bool | is_invisible () const |
Returns true when the cxform leads to alpha == 0. | |
void | read_rgb (SWFStream &in) |
Read RGB from the SWF input stream. | |
void | read_rgba (SWFStream &in) |
Read RGBA from the SWF input stream. | |
std::string | toString () const |
Public Attributes | |
boost::int16_t | ra |
boost::int16_t | rb |
boost::int16_t | ga |
boost::int16_t | gb |
boost::int16_t | ba |
boost::int16_t | bb |
boost::int16_t | aa |
boost::int16_t | ab |
Friends | |
bool | operator== (const cxform &, const cxform &) |
bool | operator!= (const cxform &, const cxform &) |
std::ostream & | operator<< (std::ostream &os, const cxform &cx) |
Color Transformation Record.
gnash::cxform::cxform | ( | ) |
void gnash::cxform::concatenate | ( | const cxform & | c | ) |
bool gnash::cxform::is_identity | ( | ) | const |
Returns true when the cxform equals identity (no transform).
bool gnash::cxform::is_invisible | ( | ) | const |
Returns true when the cxform leads to alpha == 0.
Not the _alpha property, but the visible alpha related to dislpay. The two might be completely diffrent. eg. mc._alpha ranges in [-32768, 32767] But the alpha on screen ranges in [0, 255]
cxform& gnash::cxform::load_from | ( | float * | src | ) | [inline] |
Load an cxform record from an external array.
References s2x::f.
void gnash::cxform::read_rgb | ( | SWFStream & | in | ) |
Read RGB from the SWF input stream.
Referenced by gnash::SWF::ButtonRecord::readRGBTransform().
void gnash::cxform::read_rgba | ( | SWFStream & | in | ) |
Read RGBA from the SWF input stream.
Referenced by gnash::SWF::ButtonRecord::read().
void gnash::cxform::store_to | ( | boost::int16_t * | dst | ) | const [inline] |
Store the cxform record to an external array.
std::string gnash::cxform::toString | ( | ) | const |
void gnash::cxform::transform | ( | boost::uint8_t & | r, | |
boost::uint8_t & | g, | |||
boost::uint8_t & | b, | |||
boost::uint8_t & | a | |||
) | const |
Transform the given color.
Transform the given color, return the result.
Referenced by gnash::TextField::display(), gnash::SWF::TextRecord::displayRecords(), and gnash::AddStyles::operator()().
std::ostream& operator<< | ( | std::ostream & | os, | |
const cxform & | cx | |||
) | [friend] |
boost::int16_t gnash::cxform::aa |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::ab |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::ba |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::bb |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::ga |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::gb |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::ra |
Referenced by concatenate(), cxform(), and gnash::operator==().
boost::int16_t gnash::cxform::rb |
Referenced by concatenate(), cxform(), and gnash::operator==().