1 #ifndef SkEdgeBuilder_DEFINED 2 #define SkEdgeBuilder_DEFINED 3 4 #include "SkChunkAlloc.h" 5 #include "SkRect.h" 6 #include "SkTDArray.h" 7 8 struct SkEdge; 9 class SkEdgeClipper; 10 class SkPath; 11 12 class SkEdgeBuilder { 13 public: 14 SkEdgeBuilder(); 15 16 int build(const SkPath& path, const SkIRect* clip, int shiftUp); 17 18 SkEdge** edgeList() { return fList.begin(); } 19 20 private: 21 SkChunkAlloc fAlloc; 22 SkTDArray<SkEdge*> fList; 23 int fShiftUp; 24 25 void addLine(const SkPoint pts[]); 26 void addQuad(const SkPoint pts[]); 27 void addCubic(const SkPoint pts[]); 28 void addClipper(SkEdgeClipper*); 29 }; 30 31 #endif 32