Home | History | Annotate | Download | only in core

Lines Matching refs:pts

117     void    quad_to(const SkPoint pts[3],
121 void cubic_to(const SkPoint pts[4],
239 void SkPathStroker::quad_to(const SkPoint pts[3],
243 if (!set_normal_unitnormal(pts[1], pts[2], fRadius,
245 // pts[1] nearly equals pts[2], so just draw a line to pts[2]
246 this->line_to(pts[2], normalAB);
256 SkChopQuadAtHalf(pts, tmp);
261 SkAssertResult(set_normal_unitnormal(pts[0], pts[2], fRadius,
264 fOuter.quadTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY,
265 pts[2].fX + normalBC->fX, pts[2].fY + normalBC->fY);
266 fInner.quadTo( pts[1].fX - normalB.fX, pts[1].fY - normalB.fY,
267 pts[2].fX - normalBC->fX, pts[2].fY - normalBC->fY);
271 void SkPathStroker::cubic_to(const SkPoint pts[4],
275 SkVector ab = pts[1] - pts[0];
276 SkVector cd = pts[3] - pts[2];
284 this->line_to(pts[3], normalAB);
291 ab = pts[2] - pts[0];
295 cd = pts[3] - pts[1];
302 bool degenerateBC = !set_normal_unitnormal(pts[1], pts[2], fRadius,
314 SkChopCubicAtHalf(pts, tmp);
323 // need normals to inset/outset the off-curve pts B and C
325 if (0) { // this is normal to the line between our adjacent pts
326 normalB = pts[2] - pts[0];
330 normalC = pts[3] - pts[1];
334 SkVector unitBC = pts[2] - pts[1];
349 fOuter.cubicTo( pts[1].fX + normalB.fX, pts[1].fY + normalB.fY,
350 pts[2].fX + normalC.fX, pts[2].fY + normalC.fY,
351 pts[3].fX + normalCD->fX, pts[3].fY + normalCD->fY);
353 fInner.cubicTo( pts[1].fX - normalB.fX, pts[1].fY - normalB.fY,
354 pts[2].fX - normalC.fX, pts[2].fY - normalC.fY,
355 pts[3].fX - normalCD->fX, pts[3].fY - normalCD->fY);
375 SkPoint pts[3], tmp[5];
376 pts[0] = fPrevPt;
377 pts[1] = pt1;
378 pts[2] = pt2;
380 if (SkChopQuadAtMaxCurvature(pts, tmp) == 2) {
381 unitBC.setNormalize(pts[2].fX - pts[1].fX, pts[2].fY - pts[1].fY);
406 this->quad_to(pts, normalAB, unitAB, &normalBC, &unitBC,
436 SkPoint pts[4], tmp[13];
441 pts[0] = fPrevPt;
442 pts[1] = pt1;
443 pts[2] = pt2;
444 pts[3] = pt3;
447 count = SkChopCubicAtMaxCurvature(pts, tmp, tValues);
450 memcpy(tmp, pts, 4 * sizeof(SkPoint));
470 SkEvalCubicAt(pts, tValues[i - 1], &p, &v, &c);
553 static void identity_proc(SkPoint pts[], int count) {}
554 static void shift_down_2_proc(SkPoint pts[], int count) {
556 pts->fX >>= 2;
557 pts->fY >>= 2;
558 pts += 1;
561 #define APPLY_PROC(proc, pts, count) proc(pts, count)
563 #define APPLY_PROC(proc, pts, count)
577 void (*proc)(SkPoint pts[], int count) = identity_proc;
591 SkPoint pts[4];
594 while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
597 APPLY_PROC(proc, &pts[0], 1);
598 stroker.moveTo(pts[0]);
601 APPLY_PROC(proc, &pts[1], 1);
602 stroker.lineTo(pts[1]);
606 APPLY_PROC(proc, &pts[1], 2);
607 stroker.quadTo(pts[1], pts[2]);
611 APPLY_PROC(proc, &pts[1], 3);
612 stroker.cubicTo(pts[1], pts[2], pts[3]);