Lines Matching refs:seg
223 SkContourMeasure::Segment* seg = fSegments.append(); in compute_quad_segs() local
224 seg->fDistance = distance; in compute_quad_segs()
225 seg->fPtIndex = ptIndex; in compute_quad_segs()
226 seg->fType = kQuad_SegType; in compute_quad_segs()
227 seg->fTValue = maxt; in compute_quad_segs()
251 SkContourMeasure::Segment* seg = fSegments.append(); in compute_conic_segs() local
252 seg->fDistance = distance; in compute_conic_segs()
253 seg->fPtIndex = ptIndex; in compute_conic_segs()
254 seg->fType = kConic_SegType; in compute_conic_segs()
255 seg->fTValue = maxt; in compute_conic_segs()
276 SkContourMeasure::Segment* seg = fSegments.append(); in compute_cubic_segs() local
277 seg->fDistance = distance; in compute_cubic_segs()
278 seg->fPtIndex = ptIndex; in compute_cubic_segs()
279 seg->fType = kCubic_SegType; in compute_cubic_segs()
280 seg->fTValue = maxt; in compute_cubic_segs()
294 SkContourMeasure::Segment* seg = fSegments.append(); in compute_line_seg() local
295 seg->fDistance = distance; in compute_line_seg()
296 seg->fPtIndex = ptIndex; in compute_line_seg()
297 seg->fType = kLine_SegType; in compute_line_seg()
298 seg->fTValue = kMaxTValue; in compute_line_seg()
305 const SkContourMeasure::Segment* seg = fSegments.begin(); in validate() local
311 while (seg < stop) { in validate()
312 SkASSERT(seg->fDistance > distance); in validate()
313 SkASSERT(seg->fPtIndex >= ptIndex); in validate()
314 SkASSERT(seg->fTValue > 0); in validate()
316 const SkContourMeasure::Segment* s = seg; in validate()
323 distance = seg->fDistance; in validate()
324 ptIndex = seg->fPtIndex; in validate()
325 seg += 1; in validate()
551 const Segment* seg = fSegments.begin(); in distanceToSegment() local
554 int index = SkTKSearch<Segment, SkScalar>(seg, count, distance); in distanceToSegment()
557 seg = &seg[index]; in distanceToSegment()
563 startD = seg[-1].fDistance; in distanceToSegment()
564 if (seg[-1].fPtIndex == seg->fPtIndex) { in distanceToSegment()
565 SkASSERT(seg[-1].fType == seg->fType); in distanceToSegment()
566 startT = seg[-1].getScalarT(); in distanceToSegment()
570 SkASSERT(seg->getScalarT() > startT); in distanceToSegment()
572 SkASSERT(seg->fDistance > startD); in distanceToSegment()
574 *t = startT + (seg->getScalarT() - startT) * (distance - startD) / (seg->fDistance - startD); in distanceToSegment()
575 return seg; in distanceToSegment()
594 const Segment* seg = this->distanceToSegment(distance, &t); in getPosTan() local
599 SkASSERT((unsigned)seg->fPtIndex < (unsigned)fPts.count()); in getPosTan()
600 compute_pos_tan(&fPts[seg->fPtIndex], seg->fType, t, pos, tangent); in getPosTan()
645 const Segment* seg = this->distanceToSegment(startD, &startT); in getSegment() local
653 SkASSERT(seg <= stopSeg); in getSegment()
655 compute_pos_tan(&fPts[seg->fPtIndex], seg->fType, startT, &p, nullptr); in getSegment()
659 if (seg->fPtIndex == stopSeg->fPtIndex) { in getSegment()
660 SkContourMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, startT, stopT, dst); in getSegment()
663 SkContourMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, startT, SK_Scalar1, dst); in getSegment()
664 seg = SkContourMeasure::Segment::Next(seg); in getSegment()
666 } while (seg->fPtIndex < stopSeg->fPtIndex); in getSegment()
667 SkContourMeasure_segTo(&fPts[seg->fPtIndex], seg->fType, 0, stopT, dst); in getSegment()