356 {
357 int ptIndex = -1;
359 bool haveSeenClose = fForceClosed;
360 bool haveSeenMoveTo = false;
361
362
363
364
365
366
367
368
369
372
374 for (; fIter !=
end; ++fIter) {
375 auto [verb, pts,
w] = *fIter;
377 break;
378 }
379 switch (verb) {
381 ptIndex += 1;
384 haveSeenMoveTo = true;
385 break;
386
390 distance = this->compute_line_seg(pts[0], pts[1], distance, ptIndex);
391 if (distance > prevD) {
393 ptIndex++;
394 }
395 } break;
396
401 if (distance > prevD) {
403 ptIndex += 2;
404 }
405 } break;
406
413 if (distance > prevD) {
414
415
416
419 ptIndex += 3;
420 }
421 } break;
422
427 if (distance > prevD) {
429 ptIndex += 3;
430 }
431 } break;
432
434 haveSeenClose = true;
435 break;
436 }
437
438 }
439
441 return nullptr;
442 }
443 if (fSegments.
empty()) {
444 return nullptr;
445 }
446
447 if (haveSeenClose) {
450 distance = this->compute_line_seg(fPts[ptIndex], firstPt, distance, ptIndex);
451 if (distance > prevD) {
453 }
454 }
455
456 SkDEBUGCODE(this->validate();)
457
458 return new SkContourMeasure(std::move(fSegments), std::move(fPts), distance, haveSeenClose);
459}
static bool SkIsFinite(T x, Pack... values)
@ kClose
SkPath::RawIter returns 0 points.
@ kCubic
SkPath::RawIter returns 4 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
@ kMove
SkPath::RawIter returns 1 point.
@ kLine
SkPath::RawIter returns 2 points.
void set(float x, float y)