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 15struct SkEdge; 16class SkEdgeClipper; 17class SkPath; 18 19class SkEdgeBuilder { 20public: 21 SkEdgeBuilder(); 22 23 int build(const SkPath& path, const SkIRect* clip, int shiftUp); 24 25 SkEdge** edgeList() { return fList.begin(); } 26 27private: 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 39