1 :
2 : /*
3 : * Copyright 2011 Google Inc.
4 : *
5 : * Use of this source code is governed by a BSD-style license that can be
6 : * found in the LICENSE file.
7 : */
8 : #ifndef SkEdgeBuilder_DEFINED
9 : #define SkEdgeBuilder_DEFINED
10 :
11 : #include "SkChunkAlloc.h"
12 : #include "SkRect.h"
13 : #include "SkTDArray.h"
14 :
15 : struct SkEdge;
16 : class SkEdgeClipper;
17 : class SkPath;
18 :
19 0 : class SkEdgeBuilder {
20 : public:
21 : SkEdgeBuilder();
22 :
23 : int build(const SkPath& path, const SkIRect* clip, int shiftUp);
24 :
25 0 : SkEdge** edgeList() { return fList.begin(); }
26 :
27 : private:
28 : SkChunkAlloc fAlloc;
29 : SkTDArray<SkEdge*> fList;
30 : int fShiftUp;
31 :
32 : void addLine(const SkPoint pts[]);
33 : void addQuad(const SkPoint pts[]);
34 : void addCubic(const SkPoint pts[]);
35 : void addClipper(SkEdgeClipper*);
36 : };
37 :
38 : #endif
|