Color transform for Adobe Flash. More...
Public Member Functions | |
ColorTransform () | |
Default constructor. | |
void | Identity (void) |
Set the transform to an inert state. | |
void | Concatenate (const ColorTransform *pInput) |
Concatenate a color transform. | |
void | Transform (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput) const |
Transform a color. | |
void | ReadRGB (Stream *pStream) |
Read in an RGB color transform from the input stream. | |
void | ReadRGBA (Stream *pStream) |
Read in an RGBA color transform from the input stream. | |
void | Clamp (void) |
Clamp all variables to legal values. | |
void | Print (void) const |
Prints the color transform to the debugger. | |
Public Attributes | |
float | m_fRedMultTerm |
Red scale value 0.0f to 1.0f. | |
float | m_fGreenMultTerm |
Green scale value 0.0f to 1.0f. | |
float | m_fBlueMultTerm |
Blue scale value 0.0f to 1.0f. | |
float | m_fAlphaMultTerm |
Alpha scale value 0.0f to 1.0f. | |
float | m_fRedAddTerm |
Red add value -255.0f to 255.0f. | |
float | m_fGreenAddTerm |
Green add value -255.0f to 255.0f. | |
float | m_fBlueAddTerm |
Blue add value -255.0f to 255.0f. | |
float | m_fAlphaAddTerm |
Alpha add value -255.0f to 255.0f. | |
Color transform for Adobe Flash.
This class implements the color transformation values for Adobe Flash
Look to page 23 of swf-file-format-spec.pdf for full documentation
Burger::Flash::ColorTransform::ColorTransform | ( | ) |
Default constructor.
Set all the multiplication values to 1.0f and the color adders to 0.0f
void BURGER_API Burger::Flash::ColorTransform::Clamp | ( | void | ) |
Clamp all variables to legal values.
Clamp the multiplier to 0.0f to 1.0f and the color to -255.0f to 255.0f
void BURGER_API Burger::Flash::ColorTransform::Concatenate | ( | const ColorTransform * | pInput | ) |
Concatenate a color transform.
Transform this instance with another so that it will act on a color if the input transform was done first and then this one.
pInput | Pointer to a color transform to apply to this one. |
void BURGER_API Burger::Flash::ColorTransform::Identity | ( | void | ) |
Set the transform to an inert state.
Set all the multiplication values to 1.0f and the color adders to 0.0f
void BURGER_API Burger::Flash::ColorTransform::Print | ( | void | ) | const |
void BURGER_API Burger::Flash::ColorTransform::ReadRGB | ( | Stream * | pStream | ) |
Read in an RGB color transform from the input stream.
Look to page 24 of swf-file-format-spec.pdf for full documentation
pStream | Pointer to data stream to read from |
void BURGER_API Burger::Flash::ColorTransform::ReadRGBA | ( | Stream * | pStream | ) |
Read in an RGBA color transform from the input stream.
Look to page 25 of swf-file-format-spec.pdf for full documentation
pStream | Pointer to data stream to read from |
void BURGER_API Burger::Flash::ColorTransform::Transform | ( | RGBAWord8_t * | pOutput, |
const RGBAWord8_t * | pInput ) const |
Transform a color.
Transform the color and clamp the values to prevent overflow and underflow.
pOutput | Pointer to an RGBA color to receive the transformed color |
pInput | Pointer to an RGBA color to transform |
float Burger::Flash::ColorTransform::m_fAlphaAddTerm |
Alpha add value -255.0f to 255.0f.
float Burger::Flash::ColorTransform::m_fAlphaMultTerm |
Alpha scale value 0.0f to 1.0f.
float Burger::Flash::ColorTransform::m_fBlueAddTerm |
Blue add value -255.0f to 255.0f.
float Burger::Flash::ColorTransform::m_fBlueMultTerm |
Blue scale value 0.0f to 1.0f.
float Burger::Flash::ColorTransform::m_fGreenAddTerm |
Green add value -255.0f to 255.0f.
float Burger::Flash::ColorTransform::m_fGreenMultTerm |
Green scale value 0.0f to 1.0f.
float Burger::Flash::ColorTransform::m_fRedAddTerm |
Red add value -255.0f to 255.0f.
float Burger::Flash::ColorTransform::m_fRedMultTerm |
Red scale value 0.0f to 1.0f.