Gnash
0.8.10
|
00001 // shape.h -- Thatcher Ulrich <tu@tulrich.com> 2003 00002 00003 // This source code has been donated to the Public Domain. Do 00004 // whatever you want with it. 00005 00006 // Quadratic bezier outline shapes, the basis for most SWF rendering. 00007 00008 00009 #ifndef GNASH_SHAPE_CHARACTER_DEF_H 00010 #define GNASH_SHAPE_CHARACTER_DEF_H 00011 00012 #include "DefinitionTag.h" // for inheritance of DefineShapeTag 00013 #include "SWF.h" 00014 #include "ShapeRecord.h" 00015 00016 namespace gnash { 00017 class SWFStream; 00018 class SWFCxForm; 00019 class Shape; 00020 class SWFMatrix; 00021 class RunResources; 00022 class Renderer; 00023 class Transform; 00024 } 00025 00026 namespace gnash { 00027 namespace SWF { 00028 00032 class DefineShapeTag : public DefinitionTag 00033 { 00034 public: 00035 00036 static void loader(SWFStream& in, TagType tag, movie_definition& m, 00037 const RunResources& r); 00038 00039 // Display a Shape character. 00040 void display(Renderer& renderer, const Transform& xform) const; 00041 00042 // Create a Shape DisplayObject. 00043 // Inherited from DefinitionTag, see dox there 00044 DisplayObject* createDisplayObject(Global_as& gl, 00045 DisplayObject* parent) const; 00046 00048 const SWFRect& bounds() const { return _shape.getBounds(); } 00049 00051 // 00056 bool pointTestLocal(boost::int32_t x, boost::int32_t y, 00057 const SWFMatrix& wm) const; 00058 00059 private: 00060 00061 DefineShapeTag(SWFStream& in, TagType tag, movie_definition& m, 00062 const RunResources& r, boost::uint16_t id); 00063 00065 const ShapeRecord _shape; 00066 00067 }; 00068 00069 } // namespace SWF 00070 } // namespace gnash 00071 00072 00073 #endif 00074 00075 00076 // Local Variables: 00077 // mode: C++ 00078 // c-basic-offset: 8 00079 // tab-width: 8 00080 // indent-tabs-mode: t 00081 // End: