blob: afc751d130f82dcb9393c177299183b43068f9d2 [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.com07393ca2013-04-08 11:47:37 +000011#include "SkOpContour.h"
caryclark@google.comd892bd82013-06-17 14:10:36 +000012#include "SkTDArray.h"
caryclark@google.com07393ca2013-04-08 11:47:37 +000013
14class SkPathWriter;
15
16void Assemble(const SkPathWriter& path, SkPathWriter* simple);
caryclark@google.comd892bd82013-06-17 14:10:36 +000017// FIXME: find chase uses insert, so it can't be converted to SkTArray yet
caryclark@google.com07393ca2013-04-08 11:47:37 +000018SkOpSegment* FindChase(SkTDArray<SkOpSpan*>& chase, int& tIndex, int& endIndex);
caryclark@google.com570863f2013-09-16 15:55:01 +000019SkOpSegment* FindSortableTop(const SkTArray<SkOpContour*, true>& , SkOpAngle::IncludeType ,
20 bool* firstContour, int* index, int* endIndex, SkPoint* topLeft,
21 bool* unsortable, bool* done);
caryclark@google.comd892bd82013-06-17 14:10:36 +000022SkOpSegment* FindUndone(SkTArray<SkOpContour*, true>& contourList, int* start, int* end);
caryclark@google.comd892bd82013-06-17 14:10:36 +000023void MakeContourList(SkTArray<SkOpContour>& contours, SkTArray<SkOpContour*, true>& list,
caryclark@google.com07393ca2013-04-08 11:47:37 +000024 bool evenOdd, bool oppEvenOdd);
caryclark@google.coma2bbc6e2013-11-01 17:36:03 +000025void HandleCoincidence(SkTArray<SkOpContour*, true>* , int );
caryclark@google.com07393ca2013-04-08 11:47:37 +000026
caryclark@google.coma5e55922013-05-07 18:51:31 +000027#if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY
caryclark@google.comd892bd82013-06-17 14:10:36 +000028void DebugShowActiveSpans(SkTArray<SkOpContour*, true>& contourList);
caryclark@google.com07393ca2013-04-08 11:47:37 +000029#endif
30
31#endif