Gnash
0.8.10
|
A "movie" definition for a bitmap file. More...
#include <BitmapMovieDefinition.h>
Public Member Functions | |
BitmapMovieDefinition (std::auto_ptr< image::GnashImage > image, Renderer *renderer, const std::string &url) | |
Construct a BitmapMovieDefinition for the given image (rgb) | |
virtual DisplayObject * | createDisplayObject (Global_as &, DisplayObject *) const |
Create a DisplayObject with the given parent. | |
virtual int | get_version () const |
virtual size_t | get_width_pixels () const |
Frame width in pixels. | |
virtual size_t | get_height_pixels () const |
Frame height in pixels. | |
virtual size_t | get_frame_count () const |
virtual float | get_frame_rate () const |
virtual const SWFRect & | get_frame_size () const |
Return size of frame, in TWIPS. | |
virtual size_t | get_bytes_loaded () const |
Return number of bytes loaded. | |
virtual size_t | get_bytes_total () const |
Return total number of bytes which composed this movie. | |
virtual Movie * | createMovie (Global_as &gl, DisplayObject *parent=0) |
Create a playable Movie from this def. | |
virtual const std::string & | get_url () const |
Return the URL of the SWF stream this definition has been read from. | |
size_t | get_loading_frame () const |
Returns 1 based index. Ex: if 1 then 1st frame as been fully loaded. | |
const CachedBitmap * | bitmap () const |
A "movie" definition for a bitmap file.
The createMovie function will return a BitmapMovie
gnash::BitmapMovieDefinition::BitmapMovieDefinition | ( | std::auto_ptr< image::GnashImage > | image, |
Renderer * | renderer, | ||
const std::string & | url | ||
) |
Construct a BitmapMovieDefinition for the given image (rgb)
Will be initialized with the following values
const CachedBitmap* gnash::BitmapMovieDefinition::bitmap | ( | ) | const [inline] |
DisplayObject * gnash::BitmapMovieDefinition::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.
Movie * gnash::BitmapMovieDefinition::createMovie | ( | Global_as & | gl, |
DisplayObject * | parent = 0 |
||
) | [virtual] |
Create a playable Movie from this def.
Reimplemented from gnash::movie_definition.
References gnash::key::o, gnash::getObjectWithPrototype(), and gnash::NSV::CLASS_MOVIE_CLIP.
virtual size_t gnash::BitmapMovieDefinition::get_bytes_loaded | ( | ) | const [inline, virtual] |
Return number of bytes loaded.
Since no progressive load is implemented yet we'll always return total bytes here..
Implements gnash::movie_definition.
References get_bytes_total().
virtual size_t gnash::BitmapMovieDefinition::get_bytes_total | ( | ) | const [inline, virtual] |
Return total number of bytes which composed this movie.
We actually cheat, and return the image size here...
Implements gnash::movie_definition.
Referenced by get_bytes_loaded().
virtual size_t gnash::BitmapMovieDefinition::get_frame_count | ( | ) | const [inline, virtual] |
Implements gnash::movie_definition.
virtual float gnash::BitmapMovieDefinition::get_frame_rate | ( | ) | const [inline, virtual] |
Implements gnash::movie_definition.
Referenced by gnash::BitmapMovie::frameRate().
virtual const SWFRect& gnash::BitmapMovieDefinition::get_frame_size | ( | ) | const [inline, virtual] |
Return size of frame, in TWIPS.
Implements gnash::movie_definition.
Referenced by gnash::Bitmap::Bitmap().
virtual size_t gnash::BitmapMovieDefinition::get_height_pixels | ( | ) | const [inline, virtual] |
Frame height in pixels.
The frame size is in twips and may be rounded up.
Implements gnash::movie_definition.
References gnash::twipsToPixels(), and gnash::SWFRect::height().
Referenced by gnash::BitmapMovie::heightPixels().
size_t gnash::BitmapMovieDefinition::get_loading_frame | ( | ) | const [inline, virtual] |
Returns 1 based index. Ex: if 1 then 1st frame as been fully loaded.
Implements gnash::movie_definition.
virtual const std::string& gnash::BitmapMovieDefinition::get_url | ( | ) | const [inline, virtual] |
Return the URL of the SWF stream this definition has been read from.
Implements gnash::movie_definition.
Referenced by gnash::BitmapMovie::url().
virtual int gnash::BitmapMovieDefinition::get_version | ( | ) | const [inline, virtual] |
Implements gnash::movie_definition.
Referenced by gnash::BitmapMovie::version().
virtual size_t gnash::BitmapMovieDefinition::get_width_pixels | ( | ) | const [inline, virtual] |
Frame width in pixels.
The frame size is in twips and may be rounded up.
Implements gnash::movie_definition.
References gnash::twipsToPixels(), and gnash::SWFRect::width().
Referenced by gnash::BitmapMovie::widthPixels().