#include <libsswf.h>
Inheritance diagram for sswf::TagFont:

| TagFont::TagFont | ( | TagBase * | parent | ) |
| void TagFont::AddGlyph | ( | sswf_ucs4_t | name, | |
| const TagBase * | ref, | |||
| long | advance = LONG_MIN | |||
| ) |
| void TagFont::AddKern | ( | sswf_ucs4_t | code0, | |
| sswf_ucs4_t | code1, | |||
| long | advance | |||
| ) |
| long TagFont::DefaultAscent | ( | void | ) | const |
| long TagFont::DefaultDescent | ( | void | ) | const |
| long TagFont::DefaultLeadingHeight | ( | void | ) | const |
| bool TagFont::FindGlyph | ( | font_info_t & | info, | |
| bool | mark_empty_in_use = false | |||
| ) | const |
| const char * TagFont::FontName | ( | void | ) | const |
| void TagFont::GlyphInfo | ( | font_info_t & | info | ) | const |
| bool TagFont::HasGlyph | ( | void | ) | const |
| const char * TagFont::LanguageToString | ( | font_language_t | language | ) | [static] |
| ErrorManager::error_code_t TagFont::PreSave | ( | void | ) | [private, virtual] |
This function calls the PreSave() function of all the children unless one returns a non-zero value in which case that value will be returned and the process stopped.
This function is aumatically called by the TagHeader and TagSprite in order to pre-save their children.
The PreSave() functions are expected to be used to test whether a tag can be saved. Especially, most tags will call the MinimumVersion() function with the version required to save these tags. This ensures that you can save the entire movie in a valid SWF. Please, see the reference of each tag for more information about what their PreSave() function does.
You should not have to call this function directly.
Reimplemented from sswf::TagBase.
| ErrorManager::error_code_t TagFont::PreSave2ndPass | ( | void | ) | [private, virtual] |
The PreSave2ndPass() is the same as the PreSave() function for the TagBase(). It calls the PreSave2ndPass() of all the children unless one returns a non-zero value in which case the process stops and that value is returned.
The second pass is used to check more information about the tag and prepare data such as tables. This is especially necessary for the TagFont which needs to create all the character tables to know the offsets to characters, etc. This is important because that tag may be accessed before its Save() function is called and it would still need to know where these characters are!
Reimplemented from sswf::TagBase.
| ErrorManager::error_code_t TagFont::Save | ( | Data & | data | ) | [virtual] |
The Save() function is the one you want to call to save an SWF movie.
You may use the Save() on any tag, however, if you do so you need to properly initialize the system. For that purpose, you may want to look at the code in the TagHeader::Save(Data& data) function.
Otherwise, you simply have to call the Save() function of the TagHeader. That will save the entire movie with the smallest possible version (or fail if something cannot be saved with the present parameters.)
The TagHeader::Save() function first calls the PreSave() functions, the PreSave2ndPass() and then the Save() functions of all the children.
The other tag Save() function simply save the tag within the specified Data buffer. Note however that the TagSprite will also call the Save() function of all of its children. Yet it does not call the PreSave() functions.
The Save() function saves the movie in a Data buffer. Later you need to save that buffer on disk or some other medium.
Implements sswf::TagBase.
| void TagFont::SetBold | ( | bool | bold | ) |
| void TagFont::SetDefaultAdvance | ( | long | advance | ) |
| void TagFont::SetItalic | ( | bool | italic | ) |
| void TagFont::SetLanguage | ( | font_language_t | language | ) |
| void TagFont::SetLayout | ( | long | ascent, | |
| long | descent, | |||
| long | leading_height | |||
| ) |
| void TagFont::SetName | ( | const char * | font_name | ) |
| void TagFont::SetSpaceAdvance | ( | long | advance | ) |
| void TagFont::SetType | ( | font_type_t | type | ) |
| void TagFont::SetUsedByEditText | ( | bool | used = true |
) |
| ErrorManager::error_code_t TagFont::SetUsedGlyphs | ( | const sswf_ucs4_t * | used_glyphs, | |
| bool | mark_empty_in_use = false | |||
| ) |
| void TagFont::SetWide | ( | bool | wide | ) |
| TagFont::font_language_t TagFont::StringToLanguage | ( | const char * | language | ) | [static] |
| TagBase::swf_type_t TagFont::TypeFlags | ( | void | ) | const [virtual] |
This function returns some flags that can be used to know where to place a tag in a movie, whether a tag is unique, etc.
If a tag has specifics which are not described here, it often can be checked using its name and special handling.
The existing flags are:
SWF_TYPE_DEFINE This is a definition tag (Sprite, Shape...)
SWF_TYPE_CONTROL This is a control tag (ShowFrame, PlaceObject...)
SWF_TYPE_UNIQUE This can be used once throughout the whole movie
SWF_TYPE_START This tag should be at the start of the movie
SWF_TYPE_ONE At most one per frame
SWF_TYPE_REFERENCE This tag references another
SWF_TYPE_HAS_ID This tag has an identifier
SWF_TYPE_SCRIPT This object can accept action scripts
SWF_TYPE_SPRITE This is a sprite (can include other tags)
SWF_TYPE_HEADER The header object
Implements sswf::TagBase.
long sswf::TagFont::f_ascent [private] |
bool sswf::TagFont::f_bold [private] |
unsigned long sswf::TagFont::f_count [private] |
long sswf::TagFont::f_default_advance [private] |
bool sswf::TagFont::f_define_font2 [private] |
long sswf::TagFont::f_descent [private] |
char* sswf::TagFont::f_font_name [private] |
Vectors sswf::TagFont::f_glyphs [private] |
bool sswf::TagFont::f_has_layout [private] |
bool sswf::TagFont::f_has_wide_char [private] |
bool sswf::TagFont::f_has_wide_offsets [private] |
bool sswf::TagFont::f_italic [private] |
Vectors sswf::TagFont::f_kerns [private] |
font_language_t sswf::TagFont::f_language [private] |
long sswf::TagFont::f_leading_height [private] |
unsigned long* sswf::TagFont::f_offsets [private] |
long sswf::TagFont::f_offsets_max [private] |
Data sswf::TagFont::f_save_glyphs [private] |
long sswf::TagFont::f_space_advance [private] |
font_type_t sswf::TagFont::f_type [private] |
bool sswf::TagFont::f_used_by_edit_text [private] |
bool sswf::TagFont::f_wide [private] |
const char * TagFont::g_font_language_name [static, private] |
Initial value:
{
"LOCALE",
"LATIN",
"JAPANESE",
"KOREAN",
"SIMPLIFIED_CHINESE",
"TRADITIONAL_CHINESE"
}
1.4.7