Gnash
0.8.10
|
00001 // DefineMorphShapeTag.h: Load and parse morphing shapes, for Gnash. 00002 // 00003 // Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 00004 // Free Software 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 class Transform; 00038 } 00039 00040 namespace gnash { 00041 namespace SWF { 00042 00044 // 00045 class DefineMorphShapeTag : public DefinitionTag 00046 { 00047 public: 00048 00049 static void loader(SWFStream& in, TagType tag, movie_definition& m, 00050 const RunResources& r); 00051 00052 virtual ~DefineMorphShapeTag() {} 00053 00054 virtual DisplayObject* createDisplayObject(Global_as& gl, 00055 DisplayObject* parent) const; 00056 00057 void display(Renderer& renderer, const ShapeRecord& shape, 00058 const Transform& base) const; 00059 00060 const ShapeRecord& shape1() const { 00061 return _shape1; 00062 } 00063 00064 const ShapeRecord& shape2() const { 00065 return _shape2; 00066 } 00067 00068 private: 00069 00070 DefineMorphShapeTag(SWFStream& in, SWF::TagType tag, movie_definition& md, 00071 const RunResources& r, boost::uint16_t id); 00072 00074 // 00090 void read(SWFStream& in, SWF::TagType tag, movie_definition& m, 00091 const RunResources& r); 00092 00093 ShapeRecord _shape1; 00094 ShapeRecord _shape2; 00095 00096 SWFRect _bounds; 00097 00098 }; 00099 00100 } // namespace SWF 00101 } // namespace gnash 00102 00103 00104 #endif 00105 00106 // Local Variables: 00107 // mode: C++ 00108 // c-basic-offset: 8 00109 // tab-width: 8 00110 // indent-tabs-mode: t 00111 // End: