Store a TextRecord.
More...
#include <TextRecord.h>
List of all members.
Detailed Description
Store a TextRecord.
This consists of style information and a number of glyphs. This may be parsed from a SWFStream, or it can be constructed dynamically by TextField. A static TextField has fewer possible properties than a dynamic one.
Member Typedef Documentation
Constructor & Destructor Documentation
gnash::SWF::TextRecord::TextRecord |
( |
|
) |
[inline] |
Member Function Documentation
void gnash::SWF::TextRecord::addGlyph |
( |
const GlyphEntry & |
ge, |
|
|
Glyphs::size_type |
num = 1 | |
|
) |
| | [inline] |
void gnash::SWF::TextRecord::clearGlyphs |
( |
Glyphs::size_type |
num = 0 |
) |
[inline] |
const rgba& gnash::SWF::TextRecord::color |
( |
|
) |
const [inline] |
Render the given glyph records.
Display of device fonts is complicated in Gnash as we use the same rendering process as for embedded fonts. The shape and position of a font relies on the concatenated transformation of its containing DisplayObject and all parent DisplayObjects. Device fonts have the peculiarity that the glyphs are always scaled equally in both dimensions, using the y scale only. However, indentation and left margin (the starting x position) *are* scaled using the given x scale. The translation is applied as normal. The proprietary player does not display rotated or skewed device fonts. Gnash does.
References gnash::SWF::TextRecord::GlyphEntry::advance, color(), gnash::SWFMatrix::concatenate_scale(), gnash::SWFMatrix::concatenate_translation(), gnash::Renderer::drawGlyph(), gnash::Renderer::drawLine(), gnash::key::e, gnash::Font::get_glyph(), gnash::SWFMatrix::get_x_scale(), gnash::SWFMatrix::get_y_scale(), getFont(), glyphs(), hasXOffset(), hasYOffset(), gnash::key::i, IF_VERBOSE_MALFORMED_SWF, gnash::SWF::TextRecord::GlyphEntry::index, gnash::key::j, gnash::rgba::m_a, textHeight(), gnash::cxform::transform(), gnash::SWFMatrix::tx, gnash::SWFMatrix::ty, underline(), gnash::Font::unitsPerEM(), gnash::key::x, xOffset(), gnash::key::y, and yOffset().
Referenced by gnash::TextField::display(), and gnash::SWF::DefineTextTag::display().
const Font* gnash::SWF::TextRecord::getFont |
( |
|
) |
const [inline] |
std::string gnash::SWF::TextRecord::getTarget |
( |
|
) |
[inline] |
std::string gnash::SWF::TextRecord::getURL |
( |
|
) |
[inline] |
const Glyphs& gnash::SWF::TextRecord::glyphs |
( |
|
) |
const [inline] |
bool gnash::SWF::TextRecord::hasXOffset |
( |
|
) |
const [inline] |
bool gnash::SWF::TextRecord::hasYOffset |
( |
|
) |
const [inline] |
Read a TextRecord from the stream.
- Parameters:
-
| in | The SWFStream to read from. |
| m | The movie_definition containing this TextRecord. |
| glyphBits | The number of bits per glyph |
| advanceBits | The number of bits per advance |
| tag | The tag type of this TextRecord. This must be DefineText or DefineText2 |
- Returns:
- False if we have reached the end of the TextRecords, true if there are more to parse.
References _, gnash::SWF::TextRecord::GlyphEntry::advance, gnash::SWF::DEFINETEXT, gnash::SWFStream::ensureBits(), gnash::SWFStream::ensureBytes(), gnash::movie_definition::get_font(), gnash::key::i, IF_VERBOSE_PARSE, gnash::SWF::TextRecord::GlyphEntry::index, gnash::SWFStream::read_s16(), gnash::SWFStream::read_sint(), gnash::SWFStream::read_u16(), gnash::SWFStream::read_u8(), gnash::SWFStream::read_uint(), gnash::readRGB(), and gnash::readRGBA().
float gnash::SWF::TextRecord::recordWidth |
( |
|
) |
const [inline] |
void gnash::SWF::TextRecord::setColor |
( |
const rgba & |
color |
) |
[inline] |
void gnash::SWF::TextRecord::setFont |
( |
const Font * |
f |
) |
[inline] |
void gnash::SWF::TextRecord::setTarget |
( |
std::string |
target |
) |
[inline] |
void gnash::SWF::TextRecord::setTextHeight |
( |
boost::uint16_t |
height |
) |
[inline] |
void gnash::SWF::TextRecord::setUnderline |
( |
bool |
b |
) |
[inline] |
void gnash::SWF::TextRecord::setURL |
( |
std::string |
url |
) |
[inline] |
void gnash::SWF::TextRecord::setXOffset |
( |
float |
x |
) |
[inline] |
void gnash::SWF::TextRecord::setYOffset |
( |
float |
y |
) |
[inline] |
boost::uint16_t gnash::SWF::TextRecord::textHeight |
( |
|
) |
const [inline] |
bool gnash::SWF::TextRecord::underline |
( |
|
) |
const [inline] |
float gnash::SWF::TextRecord::xOffset |
( |
|
) |
const [inline] |
float gnash::SWF::TextRecord::yOffset |
( |
|
) |
const [inline] |
The documentation for this class was generated from the following files: