OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2008 The Android Open Source Project | 3 * Copyright 2008 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "SkPathMeasure.h" | 10 #include "SkPathMeasure.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 * as we accumulate distance, we have to check that the result of += | 145 * as we accumulate distance, we have to check that the result of += |
146 * actually made it larger, since a very small delta might be > 0, but | 146 * actually made it larger, since a very small delta might be > 0, but |
147 * still have no effect on distance (if distance >>> delta). | 147 * still have no effect on distance (if distance >>> delta). |
148 * | 148 * |
149 * We do this check below, and in compute_quad_segs and compute_cubic_segs | 149 * We do this check below, and in compute_quad_segs and compute_cubic_segs |
150 */ | 150 */ |
151 fSegments.reset(); | 151 fSegments.reset(); |
152 bool done = false; | 152 bool done = false; |
153 do { | 153 do { |
154 switch (fIter.next(pts)) { | 154 switch (fIter.next(pts)) { |
| 155 case SkPath::kConic_Verb: |
| 156 SkASSERT(0); |
| 157 break; |
155 case SkPath::kMove_Verb: | 158 case SkPath::kMove_Verb: |
156 ptIndex += 1; | 159 ptIndex += 1; |
157 fPts.append(1, pts); | 160 fPts.append(1, pts); |
158 if (!firstMoveTo) { | 161 if (!firstMoveTo) { |
159 done = true; | 162 done = true; |
160 break; | 163 break; |
161 } | 164 } |
162 firstMoveTo = false; | 165 firstMoveTo = false; |
163 break; | 166 break; |
164 | 167 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 533 |
531 for (int i = 0; i < fSegments.count(); i++) { | 534 for (int i = 0; i < fSegments.count(); i++) { |
532 const Segment* seg = &fSegments[i]; | 535 const Segment* seg = &fSegments[i]; |
533 SkDebugf("pathmeas: seg[%d] distance=%g, point=%d, t=%g, type=%d\n", | 536 SkDebugf("pathmeas: seg[%d] distance=%g, point=%d, t=%g, type=%d\n", |
534 i, seg->fDistance, seg->fPtIndex, seg->getScalarT(), | 537 i, seg->fDistance, seg->fPtIndex, seg->getScalarT(), |
535 seg->fType); | 538 seg->fType); |
536 } | 539 } |
537 } | 540 } |
538 | 541 |
539 #endif | 542 #endif |
OLD | NEW |