blob: e1ae998b1037a641b3d2c0ed89a9335d9abfb3cc [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.comfa2aeee2013-07-15 13:29:13 +000017void CheckEnds(SkTArray<SkOpContour*, true>* contourList);
caryclark@google.com570863f2013-09-16 15:55:01 +000018void CheckTiny(SkTArray<SkOpContour*, true>* contourList);
caryclark@google.comd892bd82013-06-17 14:10:36 +000019// FIXME: find chase uses insert, so it can't be converted to SkTArray yet
caryclark@google.com07393ca2013-04-08 11:47:37 +000020SkOpSegment* FindChase(SkTDArray<SkOpSpan*>& chase, int& tIndex, int& endIndex);
caryclark@google.com570863f2013-09-16 15:55:01 +000021SkOpSegment* FindSortableTop(const SkTArray<SkOpContour*, true>& , SkOpAngle::IncludeType ,
22 bool* firstContour, int* index, int* endIndex, SkPoint* topLeft,
23 bool* unsortable, bool* done);
caryclark@google.comd892bd82013-06-17 14:10:36 +000024SkOpSegment* FindUndone(SkTArray<SkOpContour*, true>& contourList, int* start, int* end);
25void FixOtherTIndex(SkTArray<SkOpContour*, true>* contourList);
26void MakeContourList(SkTArray<SkOpContour>& contours, SkTArray<SkOpContour*, true>& list,
caryclark@google.com07393ca2013-04-08 11:47:37 +000027 bool evenOdd, bool oppEvenOdd);
caryclark@google.comd892bd82013-06-17 14:10:36 +000028void SortSegments(SkTArray<SkOpContour*, true>* contourList);
caryclark@google.com07393ca2013-04-08 11:47:37 +000029
caryclark@google.coma5e55922013-05-07 18:51:31 +000030#if DEBUG_ACTIVE_SPANS || DEBUG_ACTIVE_SPANS_FIRST_ONLY
caryclark@google.comd892bd82013-06-17 14:10:36 +000031void DebugShowActiveSpans(SkTArray<SkOpContour*, true>& contourList);
caryclark@google.com07393ca2013-04-08 11:47:37 +000032#endif
33
34#endif