• Home
  • Raw
  • Download

Lines Matching refs:distance

170 SkScalar SkContourMeasureIter::compute_quad_segs(const SkPoint pts[3], SkScalar distance,  in compute_quad_segs()  argument
177 distance = this->compute_quad_segs(tmp, distance, mint, halft, ptIndex); in compute_quad_segs()
178 distance = this->compute_quad_segs(&tmp[2], distance, halft, maxt, ptIndex); in compute_quad_segs()
181 SkScalar prevD = distance; in compute_quad_segs()
182 distance += d; in compute_quad_segs()
183 if (distance > prevD) { in compute_quad_segs()
186 seg->fDistance = distance; in compute_quad_segs()
192 return distance; in compute_quad_segs()
195 SkScalar SkContourMeasureIter::compute_conic_segs(const SkConic& conic, SkScalar distance, in compute_conic_segs() argument
202 return distance; in compute_conic_segs()
205 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex); in compute_conic_segs()
206 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex); in compute_conic_segs()
209 SkScalar prevD = distance; in compute_conic_segs()
210 distance += d; in compute_conic_segs()
211 if (distance > prevD) { in compute_conic_segs()
214 seg->fDistance = distance; in compute_conic_segs()
220 return distance; in compute_conic_segs()
223 SkScalar SkContourMeasureIter::compute_cubic_segs(const SkPoint pts[4], SkScalar distance, in compute_cubic_segs() argument
230 distance = this->compute_cubic_segs(tmp, distance, mint, halft, ptIndex); in compute_cubic_segs()
231 distance = this->compute_cubic_segs(&tmp[3], distance, halft, maxt, ptIndex); in compute_cubic_segs()
234 SkScalar prevD = distance; in compute_cubic_segs()
235 distance += d; in compute_cubic_segs()
236 if (distance > prevD) { in compute_cubic_segs()
239 seg->fDistance = distance; in compute_cubic_segs()
245 return distance; in compute_cubic_segs()
248 SkScalar SkContourMeasureIter::compute_line_seg(SkPoint p0, SkPoint p1, SkScalar distance, in compute_line_seg() argument
252 SkScalar prevD = distance; in compute_line_seg()
253 distance += d; in compute_line_seg()
254 if (distance > prevD) { in compute_line_seg()
257 seg->fDistance = distance; in compute_line_seg()
262 return distance; in compute_line_seg()
268 SkScalar distance = 0; in buildSegments() local
298 SkScalar prevD = distance; in buildSegments()
299 distance = this->compute_line_seg(pts[0], pts[1], distance, ptIndex); in buildSegments()
300 if (distance > prevD) { in buildSegments()
308 SkScalar prevD = distance; in buildSegments()
309 distance = this->compute_quad_segs(pts, distance, 0, kMaxTValue, ptIndex); in buildSegments()
310 if (distance > prevD) { in buildSegments()
319 SkScalar prevD = distance; in buildSegments()
320 distance = this->compute_conic_segs(conic, distance, 0, conic.fPts[0], in buildSegments()
322 if (distance > prevD) { in buildSegments()
334 SkScalar prevD = distance; in buildSegments()
335 distance = this->compute_cubic_segs(pts, distance, 0, kMaxTValue, ptIndex); in buildSegments()
336 if (distance > prevD) { in buildSegments()
353 if (!SkScalarIsFinite(distance)) { in buildSegments()
362 SkScalar prevD = distance; in buildSegments()
364 distance = this->compute_line_seg(fPts[ptIndex], firstPt, distance, ptIndex); in buildSegments()
365 if (distance > prevD) { in buildSegments()
375 SkScalar distance = 0; in buildSegments() local
379 SkASSERT(seg->fDistance > distance); in buildSegments()
390 distance = seg->fDistance; in buildSegments()
398 return new SkContourMeasure(std::move(fSegments), std::move(fPts), distance, haveSeenClose); in buildSegments()
520 const SkContourMeasure::Segment* SkContourMeasure::distanceToSegment( SkScalar distance, in distanceToSegment() argument
523 SkASSERT(distance >= 0 && distance <= length); in distanceToSegment()
528 int index = SkTKSearch<Segment, SkScalar>(seg, count, distance); in distanceToSegment()
545 SkASSERT(distance >= startD); in distanceToSegment()
548 *t = startT + (seg->getScalarT() - startT) * (distance - startD) / (seg->fDistance - startD); in distanceToSegment()
552 bool SkContourMeasure::getPosTan(SkScalar distance, SkPoint* pos, SkVector* tangent) const { in getPosTan() argument
553 if (SkScalarIsNaN(distance)) { in getPosTan()
561 if (distance < 0) { in getPosTan()
562 distance = 0; in getPosTan()
563 } else if (distance > length) { in getPosTan()
564 distance = length; in getPosTan()
568 const Segment* seg = this->distanceToSegment(distance, &t); in getPosTan()
578 bool SkContourMeasure::getMatrix(SkScalar distance, SkMatrix* matrix, MatrixFlags flags) const { in getMatrix() argument
582 if (this->getPosTan(distance, &position, &tangent)) { in getMatrix()