#include <libsswf.h>
Public Member Functions | |
Color & | GetColor (void) |
Retrive the current background color. | |
virtual ErrorManager::error_code_t | Save (Data &data) |
Save the background color. | |
void | SetColor (Color &color) |
Defines the color of the background. | |
TagSetBackgroundColor (TagBase *parent) | |
Initializes the background color object. | |
virtual swf_type_t | TypeFlags (void) const |
Defines the different types of the background color tag. | |
Private Member Functions | |
virtual ErrorManager::error_code_t | ParseTag (swf_tag_t tag, const Data &data) |
Parse data from a file into a ShowFrame tag. | |
Private Attributes | |
Color | f_color |
Note however that the default color of a TagSetBackgroundColor is black.
The background color uses a solid color (no transparency). This prevents the Browsers from showing anything behind the Flash animation.
TagSetBackgroundColor::TagSetBackgroundColor | ( | TagBase * | parent | ) |
Initializes the background object.
[in] | parent | The header in which this tag is added |
Color & TagSetBackgroundColor::GetColor | ( | void | ) |
This function returns a copy of the current background color.
References f_color.
ErrorManager::error_code_t TagSetBackgroundColor::ParseTag | ( | swf_tag_t | tag, | |
const Data & | data | |||
) | [private, virtual] |
This function does nothing since the ShowFrame tag has no data.
[in] | tag | The tag being loaded |
[in] | data | The Data buffer from the Flash file being loaded |
Implements sswf::TagBase.
References f_color, and sswf::Color::Parse().
ErrorManager::error_code_t TagSetBackgroundColor::Save | ( | Data & | data | ) | [virtual] |
This function saves the background color in the specified Data buffer.
The red, green and blue components are saved. The alpha channel is ignored.
Implements sswf::TagBase.
References sswf::Color::Blue(), sswf::ErrorManager::ERROR_CODE_NONE, f_color, sswf::Color::Green(), sswf::Data::PutByte(), sswf::Color::Red(), sswf::TagBase::SaveTag(), and sswf::TagBase::SWF_TAG_SET_BACKGROUND_COLOR.
void TagSetBackgroundColor::SetColor | ( | Color & | color | ) |
This function copies the user color as the new background color.
[in] | color | The new background color |
References f_color.
TagBase::swf_type_t TagSetBackgroundColor::TypeFlags | ( | void | ) | const [virtual] |
This function defines the SetBackgroundColor tag as:
Implements sswf::TagBase.
References SWF_TYPE_DEFINE, SWF_TYPE_START, and SWF_TYPE_UNIQUE.
Color sswf::TagSetBackgroundColor::f_color [private] |
Referenced by GetColor(), ParseTag(), Save(), and SetColor().