Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Burger::Flash::ColorTransform Class Reference

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.
 

Detailed Description

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

See also
RGBAWord8_t

Constructor & Destructor Documentation

◆ ColorTransform()

Burger::Flash::ColorTransform::ColorTransform ( )

Default constructor.


Set all the multiplication values to 1.0f and the color adders to 0.0f

See also
Identity(void)

Member Function Documentation

◆ Clamp()

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

See also
Identity(void)

◆ Concatenate()

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.

Parameters
pInputPointer to a color transform to apply to this one.
See also
Transform(RGBAWord8_t *,const RGBAWord8_t*) const

◆ Identity()

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

See also
ColorTransform()

◆ Print()

void BURGER_API Burger::Flash::ColorTransform::Print ( void ) const

Prints the color transform to the debugger.


Prints the color to Debug::Message()

◆ ReadRGB()

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

Parameters
pStreamPointer to data stream to read from
See also
ReadRGBA(Stream*)

◆ ReadRGBA()

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

Parameters
pStreamPointer to data stream to read from
See also
ReadRGB(Stream*)

◆ Transform()

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.

Parameters
pOutputPointer to an RGBA color to receive the transformed color
pInputPointer to an RGBA color to transform
See also
Concatenate(const ColorTransform *)

Member Data Documentation

◆ m_fAlphaAddTerm

float Burger::Flash::ColorTransform::m_fAlphaAddTerm

Alpha add value -255.0f to 255.0f.

◆ m_fAlphaMultTerm

float Burger::Flash::ColorTransform::m_fAlphaMultTerm

Alpha scale value 0.0f to 1.0f.

◆ m_fBlueAddTerm

float Burger::Flash::ColorTransform::m_fBlueAddTerm

Blue add value -255.0f to 255.0f.

◆ m_fBlueMultTerm

float Burger::Flash::ColorTransform::m_fBlueMultTerm

Blue scale value 0.0f to 1.0f.

◆ m_fGreenAddTerm

float Burger::Flash::ColorTransform::m_fGreenAddTerm

Green add value -255.0f to 255.0f.

◆ m_fGreenMultTerm

float Burger::Flash::ColorTransform::m_fGreenMultTerm

Green scale value 0.0f to 1.0f.

◆ m_fRedAddTerm

float Burger::Flash::ColorTransform::m_fRedAddTerm

Red add value -255.0f to 255.0f.

◆ m_fRedMultTerm

float Burger::Flash::ColorTransform::m_fRedMultTerm

Red scale value 0.0f to 1.0f.