Gnash  0.8.10
Public Member Functions
gnash::BitmapMovieDefinition Class Reference

A "movie" definition for a bitmap file. More...

#include <BitmapMovieDefinition.h>

Inheritance diagram for gnash::BitmapMovieDefinition:
gnash::movie_definition gnash::SWF::DefinitionTag gnash::SWF::ControlTag gnash::ref_counted

List of all members.

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 DisplayObjectcreateDisplayObject (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 SWFRectget_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 MoviecreateMovie (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 CachedBitmapbitmap () const

Detailed Description

A "movie" definition for a bitmap file.

The createMovie function will return a BitmapMovie


Constructor & Destructor Documentation

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

  • SWF version 6
  • Framesize extracted from image
  • Single frame (unlabeled)
  • 12 FPS
  • image->size() bytes (for get_bytes_loaded()/get_bytes_total())
  • provided url

Member Function Documentation

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.

Parameters:
glThe 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]
virtual float gnash::BitmapMovieDefinition::get_frame_rate ( ) const [inline, virtual]
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]
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().


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