Gnash
0.8.10
|
For DisplayObjects that don't store unusual state in their instances. More...
#include <Shape.h>
Public Member Functions | |
Shape (movie_root &mr, as_object *object, boost::shared_ptr< DynamicShape > sh, DisplayObject *parent) | |
Shape (movie_root &mr, as_object *object, const SWF::DefineShapeTag *def, DisplayObject *parent) | |
virtual void | display (Renderer &renderer, const Transform &xform) |
Render the DisplayObject. | |
virtual SWFRect | getBounds () const |
virtual bool | pointInShape (boost::int32_t x, boost::int32_t y) const |
Return true if the given point falls in this DisplayObject's shape. |
For DisplayObjects that don't store unusual state in their instances.
A Shape may be either statically constructed during parsing or, in AS3, dynamically constructed. A SWF-parsed Shape has an immutable SWF::DefinitionTag. A dynamic Shape object has a DynamicShape.
gnash::Shape::Shape | ( | movie_root & | mr, |
as_object * | object, | ||
boost::shared_ptr< DynamicShape > | sh, | ||
DisplayObject * | parent | ||
) | [inline] |
References assert.
gnash::Shape::Shape | ( | movie_root & | mr, |
as_object * | object, | ||
const SWF::DefineShapeTag * | def, | ||
DisplayObject * | parent | ||
) | [inline] |
References assert.
Render the DisplayObject.
All DisplayObjects must have a display() function.
Implements gnash::DisplayObject.
References gnash::DisplayObject::transform(), and gnash::DisplayObject::clear_invalidated().
virtual SWFRect gnash::Shape::getBounds | ( | ) | const [inline, virtual] |
Implements gnash::DisplayObject.
bool gnash::Shape::pointInShape | ( | boost::int32_t | x, |
boost::int32_t | y | ||
) | const [virtual] |
Return true if the given point falls in this DisplayObject's shape.
x | Point x coordinate in world space |
y | Point y coordinate in world space |
Implements gnash::DisplayObject.
References gnash::getWorldMatrix(), gnash::SWFMatrix::invert(), gnash::SWFMatrix::transform(), gnash::geometry::Point2d::x, gnash::geometry::Point2d::y, and assert.