aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkEdgeBuilder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkEdgeBuilder.h')
-rw-r--r--src/core/SkEdgeBuilder.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/SkEdgeBuilder.h b/src/core/SkEdgeBuilder.h
new file mode 100644
index 0000000000..e9ed51963b
--- /dev/null
+++ b/src/core/SkEdgeBuilder.h
@@ -0,0 +1,31 @@
+#ifndef SkEdgeBuilder_DEFINED
+#define SkEdgeBuilder_DEFINED
+
+#include "SkChunkAlloc.h"
+#include "SkRect.h"
+#include "SkTDArray.h"
+
+class SkEdge;
+class SkEdgeClipper;
+class SkPath;
+
+class SkEdgeBuilder {
+public:
+ SkEdgeBuilder();
+
+ int build(const SkPath& path, const SkIRect* clip, int shiftUp);
+
+ SkEdge** edgeList() { return fList.begin(); }
+
+private:
+ SkChunkAlloc fAlloc;
+ SkTDArray<SkEdge*> fList;
+ int fShiftUp;
+
+ void addLine(const SkPoint pts[]);
+ void addQuad(const SkPoint pts[]);
+ void addCubic(const SkPoint pts[]);
+ void addClipper(SkEdgeClipper*);
+};
+
+#endif