Lines Matching refs:distance

231                           SkScalar distance, int mint, int maxt, int ptIndex) {
237 distance = this->compute_quad_segs(tmp, distance, mint, halft, ptIndex);
238 distance = this->compute_quad_segs(&tmp[2], distance, halft, maxt, ptIndex);
241 SkScalar prevD = distance;
242 distance += d;
243 if (distance > prevD) {
245 seg->fDistance = distance;
251 return distance;
254 SkScalar SkPathMeasure::compute_conic_segs(const SkConic& conic, SkScalar distance,
260 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex);
261 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex);
264 SkScalar prevD = distance;
265 distance += d;
266 if (distance > prevD) {
268 seg->fDistance = distance;
274 return distance;
278 SkScalar distance, int mint, int maxt, int ptIndex) {
284 distance = this->compute_cubic_segs(tmp, distance, mint, halft, ptIndex);
285 distance = this->compute_cubic_segs(&tmp[3], distance, halft, maxt, ptIndex);
288 SkScalar prevD = distance;
289 distance += d;
290 if (distance > prevD) {
292 seg->fDistance = distance;
298 return distance;
304 SkScalar distance = 0;
310 * as we accumulate distance, we have to check that the result of +=
312 * still have no effect on distance (if distance >>> delta).
333 SkScalar prevD = distance;
334 distance += d;
335 if (distance > prevD) {
337 seg->fDistance = distance;
347 SkScalar prevD = distance;
351 distance += length;
353 seg->fDistance = distance;
359 distance = this->compute_quad_segs(pts, distance, 0, kMaxTValue, ptIndex);
361 if (distance > prevD) {
369 SkScalar prevD = distance;
370 distance = this->compute_conic_segs(conic, distance, 0, conic.fPts[0],
372 if (distance > prevD) {
383 SkScalar prevD = distance;
384 distance = this->compute_cubic_segs(pts, distance, 0, kMaxTValue, ptIndex);
385 if (distance > prevD) {
401 fLength = distance;
410 SkScalar distance = 0;
414 SkASSERT(seg->fDistance > distance);
425 distance = seg->fDistance;
553 SkScalar distance, SkScalar* t) {
555 SkASSERT(distance >= 0 && distance <= length);
560 int index = SkTKSearch<Segment, SkScalar>(seg, count, distance);
577 SkASSERT(distance >= startD);
580 *t = startT + (seg->getScalarT() - startT) * (distance - startD) / (seg->fDistance - startD);
584 bool SkPathMeasure::getPosTan(SkScalar distance, SkPoint* pos, SkVector* tangent) {
596 // pin the distance to a legal range
597 if (distance < 0) {
598 distance = 0;
599 } else if (distance > length) {
600 distance = length;
604 const Segment* seg = this->distanceToSegment(distance, &t);
610 bool SkPathMeasure::getMatrix(SkScalar distance, SkMatrix* matrix,
619 if (this->getPosTan(distance, &position, &tangent)) {
701 SkDebugf("pathmeas: seg[%d] distance=%g, point=%d, t=%g, type=%d\n",