Permalink
Browse files

Introduce the getTokens API

  • Loading branch information...
1 parent 18bb49e commit 18d8da9ccbfe6e9758a9e7f8fe47f1595c8fba46 @alexp-sssup alexp-sssup committed Oct 15, 2010
Showing with 7 additions and 2 deletions.
  1. +1 −1 parsing/tags.cpp
  2. +2 −1 parsing/tags.h
  3. +4 −0 scripting/flashdisplay.h
View
2 parsing/tags.cpp
@@ -1096,7 +1096,7 @@ Vector2 DefineShape3Tag::debugRender(FTFont* font, bool deep)
* * \param cur SHAPERECORD list head
* * \param shapes a vector to be populated with the shapes */
-void lightspark::FromShaperecordListToShapeVector(const std::vector<SHAPERECORD>& shapeRecords, std::vector<GeomToken>& tokens,
+void DefineShapeTag::FromShaperecordListToShapeVector(const std::vector<SHAPERECORD>& shapeRecords, std::vector<GeomToken>& tokens,
const std::list<FILLSTYLE>& fillStyles)
{
int startX=0;
View
3 parsing/tags.h
@@ -39,7 +39,6 @@ namespace lightspark
enum TAGTYPE {TAG=0,DISPLAY_LIST_TAG,SHOW_TAG,CONTROL_TAG,DICT_TAG,FRAMELABEL_TAG,END_TAG};
void ignore(std::istream& i, int count);
-void FromShaperecordListToShapeVector(const std::vector<SHAPERECORD>& shapeRecords, std::vector<GeomToken>& tokens, const std::list<FILLSTYLE>& fillStyles);
class Tag
{
@@ -99,6 +98,8 @@ class DefineShapeTag: public DictionaryTag, public DisplayObject
private:
void computeCached();
void invalidate();
+ void FromShaperecordListToShapeVector(const std::vector<SHAPERECORD>& shapeRecords,
+ std::vector<GeomToken>& tokens, const std::list<FILLSTYLE>& fillStyles);
protected:
UI16 ShapeId;
RECT ShapeBounds;
View
4 scripting/flashdisplay.h
@@ -60,6 +60,10 @@ friend class GraphicsContainer;
void localToGlobal(number_t xin, number_t yin, number_t& xout, number_t& yout) const;
void becomeMaskOf(DisplayObject* m);
void setMask(DisplayObject* m);
+ virtual const std::vector<GeomToken>& getTokens()
+ {
+ throw RunTimeException("DisplayObject::getTokens");
+ }
protected:
void computeDeviceBoundsForRect(number_t xmin, number_t xmax, number_t ymin, number_t ymax,
uint32_t& outXMin, uint32_t& outYMin, uint32_t& outWidth, uint32_t& outHeight) const;

0 comments on commit 18d8da9

Please sign in to comment.