blob: ed8031816056a1135861ac2bff29f9eb80299856 [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);
caryclark@google.com07393ca2013-04-08 11:47:37 +000019void Assemble(const SkPathWriter& path, SkPathWriter* simple);
caryclark54359292015-03-26 07:52:43 -070020SkOpSegment* FindChase(SkTDArray<SkOpSpanBase*>* chase, SkOpSpanBase** startPtr,
21 SkOpSpanBase** endPtr);
caryclark624637c2015-05-11 07:21:27 -070022SkOpSpan* FindSortableTop(SkOpContourHead* );
23SkOpSegment* FindUndone(SkOpContourHead* , SkOpSpanBase** startPtr,
caryclarkbca19f72015-05-13 08:23:48 -070024 SkOpSpanBase** endPtr);
caryclarkdae6b972016-06-08 04:28:19 -070025bool FixWinding(SkPath* path);
caryclark624637c2015-05-11 07:21:27 -070026bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
caryclark55888e42016-07-18 10:01:36 -070027bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* );
caryclark3f0753d2016-06-28 09:23:57 -070028bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result
29 SkDEBUGPARAMS(bool skipAssert)
caryclarkdae6b972016-06-08 04:28:19 -070030 SkDEBUGPARAMS(const char* testName));
caryclark55888e42016-07-18 10:01:36 -070031SkScalar ScaleFactor(const SkPath& path);
32void ScalePath(const SkPath& path, SkScalar scale, SkPath* scaled);
caryclark@google.com07393ca2013-04-08 11:47:37 +000033
34#endif