Public Member Functions

gnash::MorphShape Class Reference

A DisplayObject that tweens between two shapes. More...

#include <MorphShape.h>

Inheritance diagram for gnash::MorphShape:
Inheritance graph
[legend]
Collaboration diagram for gnash::MorphShape:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MorphShape (movie_root &mr, as_object *object, const SWF::DefineMorphShapeTag *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.
const SWF::ShapeRecordshape () const

Detailed Description

A DisplayObject that tweens between two shapes.

A MorphShape has no properties of its own, but its inherited properties may be read in AS3 using a reference to the object created with getChildAt(). Morphing is controlled using a SWF::PlaceObject2 tag with a ratio flag. The most common and efficient way is to combine this with a move flag, so that this object is moved to the position specified by the ratio. However, it is also possible to remove and replace, in which case a new MorphShape is created. The starting position is not necessarily identical with shape1, though in practice it often is.


Constructor & Destructor Documentation

gnash::MorphShape::MorphShape ( movie_root mr,
as_object object,
const SWF::DefineMorphShapeTag def,
DisplayObject parent 
)

Member Function Documentation

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

Render the DisplayObject.

All DisplayObjects must have a display() function.

Implements gnash::DisplayObject.

SWFRect gnash::MorphShape::getBounds (  )  const [virtual]
bool gnash::MorphShape::pointInShape ( boost::int32_t  x,
boost::int32_t  y 
) const [virtual]

Return true if the given point falls in this DisplayObject's shape.

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

Implements gnash::DisplayObject.

const SWF::ShapeRecord& gnash::MorphShape::shape (  )  const [inline]

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