Lines Matching refs:seg
27 const SkPathMeasure::Segment* SkPathMeasure::NextSegment(const Segment* seg) { in NextSegment() argument
28 unsigned ptIndex = seg->fPtIndex; in NextSegment()
31 ++seg; in NextSegment()
32 } while (seg->fPtIndex == ptIndex); in NextSegment()
33 return seg; in NextSegment()
249 Segment* seg = fSegments.append(); in compute_quad_segs() local
250 seg->fDistance = distance; in compute_quad_segs()
251 seg->fPtIndex = ptIndex; in compute_quad_segs()
252 seg->fType = kQuad_SegType; in compute_quad_segs()
253 seg->fTValue = maxt; in compute_quad_segs()
278 Segment* seg = fSegments.append(); in compute_conic_segs() local
279 seg->fDistance = distance; in compute_conic_segs()
280 seg->fPtIndex = ptIndex; in compute_conic_segs()
281 seg->fType = kConic_SegType; in compute_conic_segs()
282 seg->fTValue = maxt; in compute_conic_segs()
305 Segment* seg = fSegments.append(); in compute_cubic_segs() local
306 seg->fDistance = distance; in compute_cubic_segs()
307 seg->fPtIndex = ptIndex; in compute_cubic_segs()
308 seg->fType = kCubic_SegType; in compute_cubic_segs()
309 seg->fTValue = maxt; in compute_cubic_segs()
321 Segment* seg; in buildSegments() local
353 seg = fSegments.append(); in buildSegments()
354 seg->fDistance = distance; in buildSegments()
355 seg->fPtIndex = ptIndex; in buildSegments()
356 seg->fType = kLine_SegType; in buildSegments()
357 seg->fTValue = kMaxTValue; in buildSegments()
369 Segment* seg = fSegments.append(); in buildSegments() local
370 seg->fDistance = distance; in buildSegments()
371 seg->fPtIndex = ptIndex; in buildSegments()
372 seg->fType = kQuad_SegType; in buildSegments()
373 seg->fTValue = kMaxTValue; in buildSegments()
431 const Segment* seg = fSegments.begin(); in buildSegments() local
437 while (seg < stop) { in buildSegments()
438 SkASSERT(seg->fDistance > distance); in buildSegments()
439 SkASSERT(seg->fPtIndex >= ptIndex); in buildSegments()
440 SkASSERT(seg->fTValue > 0); in buildSegments()
442 const Segment* s = seg; in buildSegments()
449 distance = seg->fDistance; in buildSegments()
450 ptIndex = seg->fPtIndex; in buildSegments()
451 seg += 1; in buildSegments()
580 const Segment* seg = fSegments.begin(); in distanceToSegment() local
583 int index = SkTKSearch<Segment, SkScalar>(seg, count, distance); in distanceToSegment()
586 seg = &seg[index]; in distanceToSegment()
592 startD = seg[-1].fDistance; in distanceToSegment()
593 if (seg[-1].fPtIndex == seg->fPtIndex) { in distanceToSegment()
594 SkASSERT(seg[-1].fType == seg->fType); in distanceToSegment()
595 startT = seg[-1].getScalarT(); in distanceToSegment()
599 SkASSERT(seg->getScalarT() > startT); in distanceToSegment()
601 SkASSERT(seg->fDistance > startD); in distanceToSegment()
603 *t = startT + (seg->getScalarT() - startT) * (distance - startD) / (seg->fDistance - startD); in distanceToSegment()
604 return seg; in distanceToSegment()
623 const Segment* seg = this->distanceToSegment(distance, &t); in getPosTan() local
628 compute_pos_tan(&fPts[seg->fPtIndex], seg->fType, t, pos, tangent); in getPosTan()
674 const Segment* seg = this->distanceToSegment(startD, &startT); in getSegment() local
682 SkASSERT(seg <= stopSeg); in getSegment()
684 compute_pos_tan(&fPts[seg->fPtIndex], seg->fType, startT, &p, nullptr); in getSegment()
688 if (seg->fPtIndex == stopSeg->fPtIndex) { in getSegment()
689 SkPathMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, startT, stopT, dst); in getSegment()
692 SkPathMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, startT, SK_Scalar1, dst); in getSegment()
693 seg = SkPathMeasure::NextSegment(seg); in getSegment()
695 } while (seg->fPtIndex < stopSeg->fPtIndex); in getSegment()
696 SkPathMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, 0, stopT, dst); in getSegment()
730 const Segment* seg = &fSegments[i]; in dump() local
732 i, seg->fDistance, seg->fPtIndex, seg->getScalarT(), in dump()
733 seg->fType); in dump()