blob: 73bc0f42ccd4fcd6dce36c10ece18cafaa24d76f [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);
caryclark5b5ddd72015-05-18 05:12:56 -070025void FixWinding(SkPath* path);
caryclark624637c2015-05-11 07:21:27 -070026bool SortContourList(SkOpContourHead** , bool evenOdd, bool oppEvenOdd);
27bool HandleCoincidence(SkOpContourHead* , SkOpCoincidence* , SkChunkAlloc* );
caryclarkd4349722015-07-23 12:40:22 -070028bool OpDebug(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result,
29 bool expectSuccess SkDEBUGPARAMS(const char* testName));
caryclark54359292015-03-26 07:52:43 -070030#if DEBUG_ACTIVE_SPANS
caryclark624637c2015-05-11 07:21:27 -070031void DebugShowActiveSpans(SkOpContourHead* );
caryclark@google.com07393ca2013-04-08 11:47:37 +000032#endif
33
34#endif