Gnash 0.8.10dev
|
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 protected: 00060 00061 private: 00062 00063 DefineShapeTag(SWFStream& in, TagType tag, movie_definition& m, 00064 const RunResources& r, boost::uint16_t id); 00065 00067 const ShapeRecord _shape; 00068 00069 }; 00070 00071 } // namespace SWF 00072 } // namespace gnash 00073 00074 00075 #endif 00076 00077 00078 // Local Variables: 00079 // mode: C++ 00080 // c-basic-offset: 8 00081 // tab-width: 8 00082 // indent-tabs-mode: t 00083 // End: