Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GNASH_MORPH_SHAPE_H
00021 #define GNASH_MORPH_SHAPE_H
00022
00023 #include "smart_ptr.h"
00024 #include "DisplayObject.h"
00025 #include "swf/DefineMorphShapeTag.h"
00026 #include <boost/intrusive_ptr.hpp>
00027 #include <cassert>
00028
00029 namespace gnash {
00030 class Renderer;
00031 }
00032
00033 namespace gnash {
00034
00036
00040
00046
00049 class MorphShape : public DisplayObject
00050 {
00051
00052 public:
00053
00054 MorphShape(movie_root& mr, as_object* object,
00055 const SWF::DefineMorphShapeTag* def, DisplayObject* parent);
00056
00057 virtual void display(Renderer& renderer);
00058
00059 virtual SWFRect getBounds() const;
00060
00061 virtual bool pointInShape(boost::int32_t x, boost::int32_t y) const;
00062
00063 const SWF::ShapeRecord& shape() const {
00064 return _shape;
00065 }
00066
00067 private:
00068
00069 void morph();
00070
00071 double currentRatio() const;
00072
00073 const boost::intrusive_ptr<const SWF::DefineMorphShapeTag> _def;
00074
00075 SWF::ShapeRecord _shape;
00076
00077 };
00078
00079
00080 }
00081
00082
00083 #endif
00084
00085
00086
00087
00088
00089