OLD | NEW |
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 "SkPath.h" | 11 #include "SkPath.h" |
12 #include "SkPathOpsCubic.h" | 12 #include "SkPathOpsCubic.h" |
13 | 13 |
14 class SkOpSegment; | 14 class SkOpSegment; |
15 | 15 |
16 // sorting angles | 16 // sorting angles |
17 // given angles of {dx dy ddx ddy dddx dddy} sort them | 17 // given angles of {dx dy ddx ddy dddx dddy} sort them |
18 class SkOpAngle { | 18 class SkOpAngle { |
19 public: | 19 public: |
| 20 enum { kStackBasedCount = 8 }; // FIXME: determine what this should be |
| 21 |
20 bool operator<(const SkOpAngle& rh) const; | 22 bool operator<(const SkOpAngle& rh) const; |
21 | 23 |
22 bool calcSlop(double x, double y, double rx, double ry, bool* result) const; | 24 bool calcSlop(double x, double y, double rx, double ry, bool* result) const; |
23 | 25 |
24 double dx() const { | 26 double dx() const { |
25 return fTangent1.dx(); | 27 return fTangent1.dx(); |
26 } | 28 } |
27 | 29 |
28 double dy() const { | 30 double dy() const { |
29 return fTangent1.dy(); | 31 return fTangent1.dy(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // minimum, mark it unorderable. It still can be sorted, which is good enoug
h for find-top | 84 // minimum, mark it unorderable. It still can be sorted, which is good enoug
h for find-top |
83 // but can't be ordered, and therefore can't be used to compute winding | 85 // but can't be ordered, and therefore can't be used to compute winding |
84 bool fUnorderable; | 86 bool fUnorderable; |
85 mutable bool fUnsortable; // this alone is editable by the less than operat
or | 87 mutable bool fUnsortable; // this alone is editable by the less than operat
or |
86 #if DEBUG_ANGLE | 88 #if DEBUG_ANGLE |
87 int fID; | 89 int fID; |
88 #endif | 90 #endif |
89 }; | 91 }; |
90 | 92 |
91 #endif | 93 #endif |
OLD | NEW |