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

DefineShapeTag.h

Go to the documentation of this file.
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     virtual ~DefineShapeTag() {};
00040 
00041     // Display a Shape character.
00042     virtual void display(Renderer& renderer, const Transform& xform) const;
00043 
00044     // Create a Shape DisplayObject.
00045         virtual DisplayObject* createDisplayObject(Global_as& gl,
00046             DisplayObject* parent) const;
00047         
00049     const SWFRect& bounds() const { return _shape.getBounds(); }
00050 
00051     virtual bool pointTestLocal(boost::int32_t x, boost::int32_t y, 
00052             const SWFMatrix& wm) const;
00053 
00054 protected:
00055 
00056 private:
00057 
00058     DefineShapeTag(SWFStream& in, TagType tag, movie_definition& m,
00059             const RunResources& r, boost::uint16_t id);
00060 
00062     const ShapeRecord _shape;
00063 
00064 };
00065 
00066 } // namespace SWF
00067 } // namespace gnash
00068 
00069 
00070 #endif 
00071 
00072 
00073 // Local Variables:
00074 // mode: C++
00075 // c-basic-offset: 8 
00076 // tab-width: 8
00077 // indent-tabs-mode: t
00078 // End:

Generated on Thu Sep 2 2010 for Gnash by  doxygen 1.7.1