• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

BitmapMovie.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 3 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 // 
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00017 
00018 
00019 #ifndef GNASH_BITMAP_MOVIE_H
00020 #define GNASH_BITMAP_MOVIE_H
00021 
00022 #include <string>
00023 #include "BitmapMovieDefinition.h"
00024 #include "Movie.h" // for inheritance
00025 
00026 // Forward declarations
00027 namespace gnash
00028 {
00029     class GnashImage;
00030     class DisplayObject;
00031 }
00032 
00033 namespace gnash
00034 {
00035 
00036 
00038 //
00041 class BitmapMovie : public Movie
00042 {
00043 
00044 public:
00045 
00046         BitmapMovie(as_object* object, const BitmapMovieDefinition* def,
00047             DisplayObject* parent); 
00048 
00049         virtual ~BitmapMovie() {}
00050     
00052     //
00054         virtual void advance() { MovieClip::advance(); }
00055 
00056     virtual float frameRate() const {
00057         return _def->get_frame_rate();
00058     }
00059 
00060     virtual size_t widthPixels() const {
00061         return _def->get_width_pixels();
00062     }
00063 
00064     virtual size_t heightPixels() const {
00065         return _def->get_height_pixels();
00066     }
00067 
00068     virtual const std::string& url() const {
00069         return _def->get_url();
00070     }
00071 
00072     virtual int version() const {
00073         return _def->get_version();
00074     }
00075 
00076     virtual const movie_definition* definition() const {
00077         return _def;
00078     }
00079         
00080 private:
00081         
00082     const BitmapMovieDefinition* const _def;
00083 
00084 };
00085 
00086 } // end of namespace gnash
00087 
00088 #endif // GNASH_BITMAPMOVIEINSTANCE_H

Generated on Fri Mar 16 2012 15:46:09 for Gnash by  doxygen 1.7.1