OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 | 7 |
8 #include "SkMatrix.h" | 8 #include "SkMatrix.h" |
9 #include "SkPath.h" | 9 #include "SkPath.h" |
10 #include "SkPathOps.h" | 10 #include "SkPathOps.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 SkPath sum; | 78 SkPath sum; |
79 for (int index = 0; index < count; ++index) { | 79 for (int index = 0; index < count; ++index) { |
80 if (!Simplify(fPathRefs[index], &fPathRefs[index])) { | 80 if (!Simplify(fPathRefs[index], &fPathRefs[index])) { |
81 reset(); | 81 reset(); |
82 *result = original; | 82 *result = original; |
83 return false; | 83 return false; |
84 } | 84 } |
85 sum.addPath(fPathRefs[index]); | 85 sum.addPath(fPathRefs[index]); |
86 } | 86 } |
87 reset(); | 87 reset(); |
| 88 sum.setFillType(SkPath::kEvenOdd_FillType); |
88 bool success = Simplify(sum, result); | 89 bool success = Simplify(sum, result); |
89 if (!success) { | 90 if (!success) { |
90 *result = original; | 91 *result = original; |
91 } | 92 } |
92 return success; | 93 return success; |
93 } | 94 } |
OLD | NEW |