Lines Matching refs:pts

41         SkPoint pts[7];
43 pts[i].set(i, i);
45 SkChopCubicAt(pts, pts, .5f);
47 REPORTER_ASSERT(reporter, pts[i].fX == pts[i].fY);
48 REPORTER_ASSERT(reporter, pts[i].fX == i * .5f);
65 SkPoint pts[4] = {{rand.nextF(), rand.nextF()}, {rand.nextF(), rand.nextF()},
69 SkChopCubicAt(pts, allChops, chopTs, SK_ARRAY_COUNT(chopTs));
74 SkEvalCubicAt(pts, chopT, &expectedPt, nullptr, nullptr);
78 REPORTER_ASSERT(reporter, allChops[i] == pts[0]);
81 REPORTER_ASSERT(reporter, allChops[i] == pts[3]);
87 SkChopCubicAt(pts, localChops, chopT, chopT);
93 REPORTER_ASSERT(reporter, localChops[0] == pts[0]);
94 REPORTER_ASSERT(reporter, localChops[1] == pts[0]);
95 REPORTER_ASSERT(reporter, localChops[2] == pts[0]);
96 REPORTER_ASSERT(reporter, localChops[3] == pts[0]);
100 REPORTER_ASSERT(reporter, localChops[6] == pts[3]);
101 REPORTER_ASSERT(reporter, localChops[7] == pts[3]);
102 REPORTER_ASSERT(reporter, localChops[8] == pts[3]);
103 REPORTER_ASSERT(reporter, localChops[9] == pts[3]);
109 SkChopCubicAt(pts, oneChops, ones, SK_ARRAY_COUNT(ones));
110 REPORTER_ASSERT(reporter, oneChops[0] == pts[0]);
111 REPORTER_ASSERT(reporter, oneChops[1] == pts[1]);
112 REPORTER_ASSERT(reporter, oneChops[2] == pts[2]);
114 REPORTER_ASSERT(reporter, oneChops[index] == pts[3]);
132 SkPoint pts[3];
134 pts[j].set(rand.nextSScalar1() * 100, rand.nextSScalar1() * 100);
140 SkEvalQuadAt(pts, t, &r0);
141 SkPoint r1 = SkEvalQuadAt(pts, t);
145 SkEvalQuadAt(pts, t, nullptr, &v0);
146 SkVector v1 = SkEvalQuadTangentAt(pts, t);
171 SkPoint pts[3];
173 pts[j].set(rand.nextSScalar1() * 100, rand.nextSScalar1() * 100);
177 SkConic conic(pts, w);
191 SkPoint pts[] = {
196 int count = (int) SK_ARRAY_COUNT(pts) / 3;
198 SkConic conic(&pts[index * 3], 0.707f);
199 SkVector start = SkEvalQuadTangentAt(&pts[index * 3], 0);
200 SkVector mid = SkEvalQuadTangentAt(&pts[index * 3], .5f);
201 SkVector end = SkEvalQuadTangentAt(&pts[index * 3], 1);
211 SkPoint pts[] = {
216 int count = (int) SK_ARRAY_COUNT(pts) / 3;
218 SkConic conic(&pts[index * 3], 0.707f);
230 static void test_this_conic_to_quad(skiatest::Reporter* r, const SkPoint pts[3], SkScalar w) {
232 const SkPoint* qpts = quadder.computeQuads(pts, w, 0.25);
255 const SkPoint* pts = &triples[i];
260 test_this_conic_to_quad(reporter, pts, w);
262 test_this_conic_to_quad(reporter, pts, SK_ScalarNaN);
267 SkPoint pts[] = {
272 int count = (int) SK_ARRAY_COUNT(pts) / 4;
274 SkConic conic(&pts[index * 3], 0.707f);
276 SkEvalCubicAt(&pts[index * 4], 0, nullptr, &start, nullptr);
277 SkEvalCubicAt(&pts[index * 4], .5f, nullptr, &mid, nullptr);
278 SkEvalCubicAt(&pts[index * 4], 1, nullptr, &end, nullptr);
457 static void test_chop_quad_at_midtangent(skiatest::Reporter* reporter, const SkPoint pts[3]) {
461 m.mapPoints(mapped, pts, 3);
462 float fullRotation = SkMeasureQuadRotation(pts);
464 SkChopQuadAtMidTangent(pts, chopped);
472 static void test_chop_cubic_at_midtangent(skiatest::Reporter* reporter, const SkPoint pts[4],
483 kSkewMatrices[i].mapPoints(mapped, pts, 4);
546 auto checkQuadRotation = [=](const SkPoint pts[3], float expectedRotation) {
547 float r = SkMeasureQuadRotation(pts);
550 SkPoint cubic1[4] = {pts[0], pts[0], pts[1], pts[2]};
554 SkPoint cubic2[4] = {pts[0], pts[1], pts[1], pts[2]};
558 SkPoint cubic3[4] = {pts[0], pts[1], pts[2], pts[2]};
617 SkPoint pts[5];
619 pts[0].set(0, 0);
620 pts[1].set(100, 50);
621 pts[2].set(0, 100);
623 int count = SkChopQuadAtMaxCurvature(pts, pts); // Ensure src and dst can be the same pointer.
628 pts[0].set(15.1213f, 7.77647f);
629 pts[1].set(6.2168e+19f, 1.51338e+20f);
630 pts[2].set(1.4579e+19f, 1.55558e+21f);
631 count = SkChopQuadAtMaxCurvature(pts, pts);
633 pts[0].set(0, 0);
634 pts[1].set(3, 0);
635 pts[2].set(3, 3);
636 SkConvertQuadToCubic(pts, pts);
641 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], pts[i]));