Gnash
0.8.10
|
Represents the outline of one or more shapes, along with information on fill and line styles. More...
#include <DefineShapeTag.h>
Public Member Functions | |
void | display (Renderer &renderer, const Transform &xform) const |
DisplayObject * | createDisplayObject (Global_as &gl, DisplayObject *parent) const |
Create a DisplayObject with the given parent. | |
const SWFRect & | bounds () const |
Get cached bounds of this shape. | |
bool | pointTestLocal (boost::int32_t x, boost::int32_t y, const SWFMatrix &wm) const |
Check if the given point is inside this shape. | |
Static Public Member Functions | |
static void | loader (SWFStream &in, TagType tag, movie_definition &m, const RunResources &r) |
Represents the outline of one or more shapes, along with information on fill and line styles.
const SWFRect& gnash::SWF::DefineShapeTag::bounds | ( | ) | const [inline] |
Get cached bounds of this shape.
References gnash::SWF::ShapeRecord::getBounds().
DisplayObject * gnash::SWF::DefineShapeTag::createDisplayObject | ( | Global_as & | gl, |
DisplayObject * | parent | ||
) | const [virtual] |
Create a DisplayObject with the given parent.
This function will determine the correct prototype and associated object using the passed global.
gl | The global object used to set prototype and associated object. Calling this function creates a new DisplayObject from the DefinitionTag and adds it as a child of the specified parent DisplayObject. |
Implements gnash::SWF::DefinitionTag.
References gnash::getRoot().
References gnash::Renderer::drawShape().
void gnash::SWF::DefineShapeTag::loader | ( | SWFStream & | in, |
TagType | tag, | ||
movie_definition & | m, | ||
const RunResources & | r | ||
) | [static] |
References assert, gnash::SWF::DEFINESHAPE, gnash::SWF::DEFINESHAPE2, gnash::SWF::DEFINESHAPE3, gnash::SWF::DEFINESHAPE4, gnash::SWF::DEFINESHAPE4_, gnash::SWFStream::ensureBytes(), gnash::SWFStream::read_u16(), IF_VERBOSE_PARSE, _, and gnash::movie_definition::addDisplayObject().
Referenced by gnash::SWF::addDefaultLoaders().
bool gnash::SWF::DefineShapeTag::pointTestLocal | ( | boost::int32_t | x, |
boost::int32_t | y, | ||
const SWFMatrix & | wm | ||
) | const |
Check if the given point is inside this shape.
Coordinates are given in the definition scale, but a matrix is given to allow computing proper line thickness based on display scale.
References gnash::geometry::pointTest(), gnash::SWF::ShapeRecord::paths(), gnash::SWF::ShapeRecord::lineStyles(), x, and y.