blob: 679a4869307f13a33206d090cff68c80fb3c7b06 [file] [log] [blame]
caryclark@google.com07393ca2013-04-08 11:47:37 +00001/*
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
caryclark@google.com570863f2013-09-16 15:55:01 +000010#include "SkOpAngle.h"
caryclark@google.comd892bd82013-06-17 14:10:36 +000011#include "SkTDArray.h"
caryclark@google.com07393ca2013-04-08 11:47:37 +000012
caryclark54359292015-03-26 07:52:43 -070013class SkOpCoincidence;
14class SkOpContour;
caryclark@google.com07393ca2013-04-08 11:47:37 +000015class SkPathWriter;
16
caryclarkbca19f72015-05-13 08:23:48 -070017const SkOpAngle* AngleWinding(SkOpSpanBase* start, SkOpSpanBase* end, int* windingPtr,
18 bool* sortable);
caryclark54359292015-03-26 07:52:43 -070019SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
20 SkOpSpanBase** endPtr);
caryclark624637c2015-05-11 07:21:27 -070021SkOpSpan* FindSortableTop(SkOpContourHead* );
Cary Clarkab2d73b2016-12-16 17:17:25 -050022SkOpSpan* FindUndone(SkOpContourHead* );
caryclarkdae6b972016-06-08 04:28:19 -070023bool FixWinding(SkPath* path);
caryclark624637c2015-05-11 07:21:27 -070024bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
caryclark55888e42016-07-18 10:01:36 -070025bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* );
caryclark3f0753d2016-06-28 09:23:57 -070026bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
27 SkDEBUGPARAMS(bool skipAssert)
caryclarkdae6b972016-06-08 04:28:19 -070028 SkDEBUGPARAMS(const char* testName));
caryclark55888e42016-07-18 10:01:36 -070029SkScalar ScaleFactor(const SkPath& path);
30void ScalePath(const SkPath& path, SkScalar scale, SkPath* scaled);
caryclark@google.com07393ca2013-04-08 11:47:37 +000031
32#endif