Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: src/pathops/SkOpAngle.h

Issue 1037953004: add conics to path ops (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix linux build Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkOpAngle_DEFINED 7 #ifndef SkOpAngle_DEFINED
8 #define SkOpAngle_DEFINED 8 #define SkOpAngle_DEFINED
9 9
10 #include "SkLineParameters.h" 10 #include "SkLineParameters.h"
11 #include "SkPathOpsCurve.h"
11 #if DEBUG_ANGLE 12 #if DEBUG_ANGLE
12 #include "SkString.h" 13 #include "SkString.h"
13 #endif 14 #endif
14 15
15 class SkOpContour; 16 class SkOpContour;
16 class SkOpPtT; 17 class SkOpPtT;
17 class SkOpSegment; 18 class SkOpSegment;
18 class SkOpSpanBase; 19 class SkOpSpanBase;
19 class SkOpSpan; 20 class SkOpSpan;
20 21
(...skipping 10 matching lines...) Expand all
31 bool checkCrossesZero() const; 32 bool checkCrossesZero() const;
32 void checkNearCoincidence(); 33 void checkNearCoincidence();
33 bool checkParallel(SkOpAngle* ); 34 bool checkParallel(SkOpAngle* );
34 bool computeSector(); 35 bool computeSector();
35 int convexHullOverlaps(const SkOpAngle* ) const; 36 int convexHullOverlaps(const SkOpAngle* ) const;
36 37
37 const SkOpAngle* debugAngle(int id) const; 38 const SkOpAngle* debugAngle(int id) const;
38 SkOpContour* debugContour(int id); 39 SkOpContour* debugContour(int id);
39 40
40 int debugID() const { 41 int debugID() const {
41 return PATH_OPS_DEBUG_RELEASE(fID, -1); 42 return SkDEBUGRELEASE(fID, -1);
42 } 43 }
43 44
44 #if DEBUG_SORT 45 #if DEBUG_SORT
45 void debugLoop() const; 46 void debugLoop() const;
46 #endif 47 #endif
47 48
48 #if DEBUG_ANGLE 49 #if DEBUG_ANGLE
49 SkString debugPart() const; 50 SkString debugPart() const;
50 #endif 51 #endif
51 const SkOpPtT* debugPtT(int id) const; 52 const SkOpPtT* debugPtT(int id) const;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 int sectorStart() const { 96 int sectorStart() const {
96 return fSectorStart; 97 return fSectorStart;
97 } 98 }
98 99
99 SkOpSegment* segment() const; 100 SkOpSegment* segment() const;
100 101
101 void set(SkOpSpanBase* start, SkOpSpanBase* end); 102 void set(SkOpSpanBase* start, SkOpSpanBase* end);
102 void setCurveHullSweep(); 103 void setCurveHullSweep();
103 104
104 void setID(int id) { 105 void setID(int id) {
105 PATH_OPS_DEBUG_CODE(fID = id); 106 SkDEBUGCODE(fID = id);
106 } 107 }
107 108
108 void setLastMarked(SkOpSpanBase* marked) { 109 void setLastMarked(SkOpSpanBase* marked) {
109 fLastMarked = marked; 110 fLastMarked = marked;
110 } 111 }
111 112
112 void setSector(); 113 void setSector();
113 void setSpans(); 114 void setSpans();
114 int sign() const; 115 int sign() const;
115 116
116 SkOpSpanBase* start() const { 117 SkOpSpanBase* start() const {
117 return fStart; 118 return fStart;
118 } 119 }
119 120
120 SkOpSpan* starter(); 121 SkOpSpan* starter();
121 bool tangentsDiverge(const SkOpAngle* rh, double s0xt0) const; 122 bool tangentsDiverge(const SkOpAngle* rh, double s0xt0) const;
122 123
123 bool unorderable() const { 124 bool unorderable() const {
124 return fUnorderable; 125 return fUnorderable;
125 } 126 }
126 127
127 SkDCubic fCurvePart; // the curve from start to end 128 SkDCurve fCurvePart; // the curve from start to end
128 double fSide; 129 double fSide;
129 SkLineParameters fTangentHalf; // used only to sort a pair of lines or line -like sections 130 SkLineParameters fTangentHalf; // used only to sort a pair of lines or line -like sections
130 SkOpAngle* fNext; 131 SkOpAngle* fNext;
131 SkOpSpanBase* fLastMarked; 132 SkOpSpanBase* fLastMarked;
132 SkDVector fSweep[2]; 133 SkDVector fSweep[2];
133 SkOpSpanBase* fStart; 134 SkOpSpanBase* fStart;
134 SkOpSpanBase* fEnd; 135 SkOpSpanBase* fEnd;
135 SkOpSpanBase* fComputedEnd; 136 SkOpSpanBase* fComputedEnd;
136 int fSectorMask; 137 int fSectorMask;
137 int8_t fSectorStart; // in 32nds of a circle 138 int8_t fSectorStart; // in 32nds of a circle
138 int8_t fSectorEnd; 139 int8_t fSectorEnd;
139 bool fIsCurve; 140 bool fIsCurve;
140 bool fStop; // set if ordered angle is greater than the previous 141 bool fStop; // set if ordered angle is greater than the previous
141 bool fUnorderable; 142 bool fUnorderable;
142 bool fUnorderedSweep; // set when a cubic's first control point between the sweep vectors 143 bool fUnorderedSweep; // set when a cubic's first control point between the sweep vectors
143 bool fComputeSector; 144 bool fComputeSector;
144 bool fComputedSector; 145 bool fComputedSector;
145 bool fCheckCoincidence; 146 bool fCheckCoincidence;
146 PATH_OPS_DEBUG_CODE(int fID); 147 SkDEBUGCODE(int fID);
147 148
148 }; 149 };
149 150
150 151
151 152
152 #endif 153 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698