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

DefineMorphShapeTag.h

Go to the documentation of this file.
00001 // DefineMorphShapeTag.h:   Load and parse morphing shapes, for Gnash.
00002 //
00003 //   Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software
00004 //   Foundation, Inc
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 3 of the License, or
00009 // (at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 // Based on the public domain work of Mike Shaver <shaver@off.net> 2003,
00021 // Vitalij Alexeev <tishka92@mail.ru> 2004.
00022 
00023 #ifndef GNASH_SWF_MORPH_SHAPE_H
00024 #define GNASH_SWF_MORPH_SHAPE_H
00025 
00026 #include "SWF.h"
00027 #include "ShapeRecord.h"
00028 #include "DefinitionTag.h"
00029 
00030 // Forward declarations.
00031 namespace gnash {
00032     class movie_definition;
00033     class SWFStream;
00034         class RunResources;
00035     class MorphShape;
00036     class Renderer;
00037 }
00038 
00039 namespace gnash {
00040 namespace SWF {
00041 
00043 //
00044 class DefineMorphShapeTag : public DefinitionTag
00045 {
00046 public:
00047 
00048     static void loader(SWFStream& in, TagType tag, movie_definition& m,
00049             const RunResources& r);
00050 
00051     virtual ~DefineMorphShapeTag() {}
00052 
00053         virtual DisplayObject* createDisplayObject(Global_as& gl,
00054             DisplayObject* parent) const;
00055 
00056     virtual void display(Renderer& renderer, const MorphShape& inst) const;
00057 
00058     const ShapeRecord& shape1() const { 
00059         return _shape1;
00060     }
00061     
00062     const ShapeRecord& shape2() const { 
00063         return _shape2;
00064     }
00065 
00066 private:
00067 
00068     DefineMorphShapeTag(SWFStream& in, SWF::TagType tag, movie_definition& md,
00069             const RunResources& r, boost::uint16_t id);
00070     
00072     //
00088     void read(SWFStream& in, SWF::TagType tag, movie_definition& m,
00089             const RunResources& r);
00090 
00091     ShapeRecord _shape1;
00092     ShapeRecord _shape2;
00093     
00094     SWFRect _bounds;
00095 
00096 };
00097 
00098 } // namespace SWF
00099 } // namespace gnash
00100 
00101 
00102 #endif 
00103 
00104 // Local Variables:
00105 // mode: C++
00106 // c-basic-offset: 8 
00107 // tab-width: 8
00108 // indent-tabs-mode: t
00109 // End:

Generated on Thu Sep 30 2010 14:34:57 for Gnash by  doxygen 1.7.1