SkPathOpsCommon.h revision ab2d73b06fe6c518be1d399a79c9cc39db21abb6
1/*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#ifndef SkPathOpsCommon_DEFINED
8#define SkPathOpsCommon_DEFINED
9
10#include "SkOpAngle.h"
11#include "SkTDArray.h"
12
13class SkOpCoincidence;
14class SkOpContour;
15class SkPathWriter;
16
17const SkOpAngle* AngleWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* windingPtr,
18                              bool* sortable);
19SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
20                       SkOpSpanBase** endPtr);
21SkOpSpan* FindSortableTop(SkOpContourHead* );
22SkOpSpan* FindUndone(SkOpContourHead* );
23bool FixWinding(SkPath* path);
24bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
25bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* );
26bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
27             SkDEBUGPARAMS(bool skipAssert)
28             SkDEBUGPARAMS(const char* testName));
29SkScalar ScaleFactor(const SkPath& path);
30void ScalePath(const SkPath& path, SkScalar scale, SkPath* scaled);
31
32#endif
33