Lines Matching full:distance
147 SkScalar distance, int mint, int maxt, int ptIndex) {
153 distance = this->compute_quad_segs(tmp, distance, mint, halft, ptIndex);
154 distance = this->compute_quad_segs(&tmp[2], distance, halft, maxt, ptIndex);
156 SkScalar d = SkPoint::Distance(pts[0], pts[2]);
157 SkScalar prevD = distance;
158 distance += d;
159 if (distance > prevD) {
161 seg->fDistance = distance;
167 return distance;
170 SkScalar SkPathMeasure::compute_conic_segs(const SkConic& conic, SkScalar distance,
176 distance = this->compute_conic_segs(conic, distance, mint, minPt, halft, halfPt, ptIndex);
177 distance = this->compute_conic_segs(conic, distance, halft, halfPt, maxt, maxPt, ptIndex);
179 SkScalar d = SkPoint::Distance(minPt, maxPt);
180 SkScalar prevD = distance;
181 distance += d;
182 if (distance > prevD) {
184 seg->fDistance = distance;
190 return distance;
194 SkScalar distance, int mint, int maxt, int ptIndex) {
200 distance = this->compute_cubic_segs(tmp, distance, mint, halft, ptIndex);
201 distance = this->compute_cubic_segs(&tmp[3], distance, halft, maxt, ptIndex);
203 SkScalar d = SkPoint::Distance(pts[0], pts[3]);
204 SkScalar prevD = distance;
205 distance += d;
206 if (distance > prevD) {
208 seg->fDistance = distance;
214 return distance;
220 SkScalar distance = 0;
226 * as we accumulate distance, we have to check that the result of +=
228 * still have no effect on distance (if distance >>> delta).
247 SkScalar d = SkPoint::Distance(pts[0], pts[1]);
249 SkScalar prevD = distance;
250 distance += d;
251 if (distance > prevD) {
253 seg->fDistance = distance;
263 SkScalar prevD = distance;
267 distance += length;
269 seg->fDistance = distance;
275 distance = this->compute_quad_segs(pts, distance, 0, kMaxTValue, ptIndex);
277 if (distance > prevD) {
285 SkScalar prevD = distance;
286 distance = this->compute_conic_segs(conic, distance, 0, conic.fPts[0],
288 if (distance > prevD) {
299 SkScalar prevD = distance;
300 distance = this->compute_cubic_segs(pts, distance, 0, kMaxTValue, ptIndex);
301 if (distance > prevD) {
317 fLength = distance;
326 SkScalar distance = 0;
329 SkASSERT(seg->fDistance > distance);
340 distance = seg->fDistance;
555 SkScalar distance, SkScalar* t) {
557 SkASSERT(distance >= 0 && distance <= length);
562 int index = SkTKSearch<Segment, SkScalar>(seg, count, distance);
579 SkASSERT(distance >= startD);
583 distance - startD,
588 bool SkPathMeasure::getPosTan(SkScalar distance, SkPoint* pos,
601 // pin the distance to a legal range
602 if (distance < 0) {
603 distance = 0;
604 } else if (distance > length) {
605 distance = length;
609 const Segment* seg = this->distanceToSegment(distance, &t);
615 bool SkPathMeasure::getMatrix(SkScalar distance, SkMatrix* matrix,
624 if (this->getPosTan(distance, &position, &tangent)) {
706 SkDebugf("pathmeas: seg[%d] distance=%g, point=%d, t=%g, type=%d\n",