Gnash  0.8.10
Public Member Functions
gnash::Shape Class Reference

For DisplayObjects that don't store unusual state in their instances. More...

#include <Shape.h>

Inheritance diagram for gnash::Shape:
gnash::DisplayObject gnash::GcResource

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

void gnash::Shape::display ( Renderer renderer,
const Transform xform 
) [virtual]

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.

Parameters:
xPoint x coordinate in world space
yPoint y coordinate in world space
Returns:
Whether (x, y) is within the DisplayObject's bounds.

Implements gnash::DisplayObject.

References gnash::getWorldMatrix(), gnash::SWFMatrix::invert(), gnash::SWFMatrix::transform(), gnash::geometry::Point2d::x, gnash::geometry::Point2d::y, and assert.


The documentation for this class was generated from the following files: