Home | History | Annotate | Download | only in core

Lines Matching defs:seg

38 const SkPathMeasure::Segment* SkPathMeasure::NextSegment(const Segment* seg) {
39 unsigned ptIndex = seg->fPtIndex;
42 ++seg;
43 } while (seg->fPtIndex == ptIndex);
44 return seg;
113 Segment* seg = fSegments.append();
114 seg->fDistance = distance;
115 seg->fPtIndex = ptIndex;
116 seg->fType = kQuad_SegType;
117 seg->fTValue = maxt;
137 Segment* seg = fSegments.append();
138 seg->fDistance = distance;
139 seg->fPtIndex = ptIndex;
140 seg->fType = kCubic_SegType;
141 seg->fTValue = maxt;
153 Segment* seg;
173 seg = fSegments.append();
174 seg->fDistance = distance;
175 seg->fPtIndex = ptIndex;
176 seg->fType = kLine_SegType;
177 seg->fTValue = kMaxTValue;
212 const Segment* seg = fSegments.begin();
217 while (seg < stop) {
218 SkASSERT(seg->fDistance > distance);
219 SkASSERT(seg->fPtIndex >= ptIndex);
220 SkASSERT(seg->fTValue > 0);
222 const Segment* s = seg;
229 distance = seg->fDistance;
230 ptIndex = seg->fPtIndex;
231 seg += 1;
387 const Segment* seg = fSegments.begin();
390 int index = SkTSearch<SkScalar>(&seg->fDistance, count, distance,
394 seg = &seg[index];
400 startD = seg[-1].fDistance;
401 if (seg[-1].fPtIndex == seg->fPtIndex) {
402 SkASSERT(seg[-1].fType == seg->fType);
403 startT = seg[-1].getScalarT();
407 SkASSERT(seg->getScalarT() > startT);
409 SkASSERT(seg->fDistance > startD);
411 *t = startT + SkScalarMulDiv(seg->getScalarT() - startT,
413 seg->fDistance - startD);
414 return seg;
439 const Segment* seg = this->distanceToSegment(distance, &t);
441 compute_pos_tan(fPts, seg->fPtIndex, seg->fType, t, pos, tangent);
484 const Segment* seg = this->distanceToSegment(startD, &startT);
486 SkASSERT(seg <= stopSeg);
489 compute_pos_tan(fPts, seg->fPtIndex, seg->fType, startT, &p, NULL);
493 if (seg->fPtIndex == stopSeg->fPtIndex) {
494 seg_to(fPts, seg->fPtIndex, seg->fType, startT, stopT, dst);
497 seg_to(fPts, seg->fPtIndex, seg->fType, startT, SK_Scalar1, dst);
498 seg = SkPathMeasure::NextSegment(seg);
500 } while (seg->fPtIndex < stopSeg->fPtIndex);
501 seg_to(fPts, seg->fPtIndex, seg->fType, 0, stopT, dst);
528 const Segment* seg = &fSegments[i];
529 SkDebugf("pathmeas: seg[%d] distance=%g, point=%d, t=%g, type=%d\n",
530 i, seg->fDistance, seg->fPtIndex, seg->getScalarT(),
531 seg->fType);