Lines Matching refs:pts
74 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY()
75 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY()
78 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX()
79 return chopMonoQuadAt(pts[0].fX, pts[1].fX, pts[2].fX, x, t); in chopMonoQuadAtX()
83 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y()
88 if (pts[0].fY < clip.fTop) { in chop_quad_in_Y()
89 if (chopMonoQuadAtY(pts, clip.fTop, &t)) { in chop_quad_in_Y()
91 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y()
94 pts[0] = tmp[2]; in chop_quad_in_Y()
95 pts[1] = tmp[3]; in chop_quad_in_Y()
100 if (pts[i].fY < clip.fTop) { in chop_quad_in_Y()
101 pts[i].fY = clip.fTop; in chop_quad_in_Y()
108 if (pts[2].fY > clip.fBottom) { in chop_quad_in_Y()
109 if (chopMonoQuadAtY(pts, clip.fBottom, &t)) { in chop_quad_in_Y()
110 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y()
113 pts[1] = tmp[1]; in chop_quad_in_Y()
114 pts[2] = tmp[2]; in chop_quad_in_Y()
119 if (pts[i].fY > clip.fBottom) { in chop_quad_in_Y()
120 pts[i].fY = clip.fBottom; in chop_quad_in_Y()
129 SkPoint pts[3]; in clipMonoQuad() local
130 bool reverse = sort_increasing_Y(pts, srcPts, 3); in clipMonoQuad()
133 if (pts[2].fY <= clip.fTop || pts[0].fY >= clip.fBottom) { in clipMonoQuad()
138 chop_quad_in_Y(pts, clip); in clipMonoQuad()
140 if (pts[0].fX > pts[2].fX) { in clipMonoQuad()
141 SkTSwap<SkPoint>(pts[0], pts[2]); in clipMonoQuad()
144 SkASSERT(pts[0].fX <= pts[1].fX); in clipMonoQuad()
145 SkASSERT(pts[1].fX <= pts[2].fX); in clipMonoQuad()
149 if (pts[2].fX <= clip.fLeft) { // wholly to the left in clipMonoQuad()
150 this->appendVLine(clip.fLeft, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
153 if (pts[0].fX >= clip.fRight) { // wholly to the right in clipMonoQuad()
154 this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
162 if (pts[0].fX < clip.fLeft) { in clipMonoQuad()
163 if (chopMonoQuadAtX(pts, clip.fLeft, &t)) { in clipMonoQuad()
164 SkChopQuadAt(pts, tmp, t); in clipMonoQuad()
168 pts[0] = tmp[2]; in clipMonoQuad()
169 pts[1] = tmp[3]; in clipMonoQuad()
173 this->appendVLine(clip.fLeft, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
179 if (pts[2].fX > clip.fRight) { in clipMonoQuad()
180 if (chopMonoQuadAtX(pts, clip.fRight, &t)) { in clipMonoQuad()
181 SkChopQuadAt(pts, tmp, t); in clipMonoQuad()
189 this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
192 this->appendQuad(pts, reverse); in clipMonoQuad()
266 static bool chopMonoCubicAtY(SkPoint pts[4], SkScalar y, SkScalar* t) { in chopMonoCubicAtY()
267 return chopMonoCubicAt(pts[0].fY, pts[1].fY, pts[2].fY, pts[3].fY, y, t); in chopMonoCubicAtY()
270 static bool chopMonoCubicAtX(SkPoint pts[4], SkScalar x, SkScalar* t) { in chopMonoCubicAtX()
271 return chopMonoCubicAt(pts[0].fX, pts[1].fX, pts[2].fX, pts[3].fX, x, t); in chopMonoCubicAtX()
275 static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { in chop_cubic_in_Y()
280 if (pts[0].fY < clip.fTop) { in chop_cubic_in_Y()
281 if (chopMonoCubicAtY(pts, clip.fTop, &t)) { in chop_cubic_in_Y()
282 SkChopCubicAt(pts, tmp, t); in chop_cubic_in_Y()
290 pts[0] = tmp[3]; in chop_cubic_in_Y()
291 pts[1] = tmp[4]; in chop_cubic_in_Y()
292 pts[2] = tmp[5]; in chop_cubic_in_Y()
297 clamp_ge(pts[i].fY, clip.fTop); in chop_cubic_in_Y()
303 if (pts[3].fY > clip.fBottom) { in chop_cubic_in_Y()
304 if (chopMonoCubicAtY(pts, clip.fBottom, &t)) { in chop_cubic_in_Y()
305 SkChopCubicAt(pts, tmp, t); in chop_cubic_in_Y()
309 pts[1] = tmp[1]; in chop_cubic_in_Y()
310 pts[2] = tmp[2]; in chop_cubic_in_Y()
311 pts[3] = tmp[3]; in chop_cubic_in_Y()
316 clamp_le(pts[i].fY, clip.fBottom); in chop_cubic_in_Y()
324 SkPoint pts[4]; in clipMonoCubic() local
325 bool reverse = sort_increasing_Y(pts, src, 4); in clipMonoCubic()
328 if (pts[3].fY <= clip.fTop || pts[0].fY >= clip.fBottom) { in clipMonoCubic()
333 chop_cubic_in_Y(pts, clip); in clipMonoCubic()
335 if (pts[0].fX > pts[3].fX) { in clipMonoCubic()
336 SkTSwap<SkPoint>(pts[0], pts[3]); in clipMonoCubic()
337 SkTSwap<SkPoint>(pts[1], pts[2]); in clipMonoCubic()
343 if (pts[3].fX <= clip.fLeft) { // wholly to the left in clipMonoCubic()
344 this->appendVLine(clip.fLeft, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
347 if (pts[0].fX >= clip.fRight) { // wholly to the right in clipMonoCubic()
348 this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
356 if (pts[0].fX < clip.fLeft) { in clipMonoCubic()
357 if (chopMonoCubicAtX(pts, clip.fLeft, &t)) { in clipMonoCubic()
358 SkChopCubicAt(pts, tmp, t); in clipMonoCubic()
363 pts[0] = tmp[3]; in clipMonoCubic()
364 pts[1] = tmp[4]; in clipMonoCubic()
365 pts[2] = tmp[5]; in clipMonoCubic()
369 this->appendVLine(clip.fLeft, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
375 if (pts[3].fX > clip.fRight) { in clipMonoCubic()
376 if (chopMonoCubicAtX(pts, clip.fRight, &t)) { in clipMonoCubic()
377 SkChopCubicAt(pts, tmp, t); in clipMonoCubic()
386 this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
389 this->appendCubic(pts, reverse); in clipMonoCubic()
437 void SkEdgeClipper::appendQuad(const SkPoint pts[3], bool reverse) { in appendQuad()
441 fCurrPoint[0] = pts[2]; in appendQuad()
442 fCurrPoint[2] = pts[0]; in appendQuad()
444 fCurrPoint[0] = pts[0]; in appendQuad()
445 fCurrPoint[2] = pts[2]; in appendQuad()
447 fCurrPoint[1] = pts[1]; in appendQuad()
451 void SkEdgeClipper::appendCubic(const SkPoint pts[4], bool reverse) { in appendCubic()
456 fCurrPoint[i] = pts[3 - i]; in appendCubic()
459 memcpy(fCurrPoint, pts, 4 * sizeof(SkPoint)); in appendCubic()
464 SkPath::Verb SkEdgeClipper::next(SkPoint pts[]) { in next() argument
469 memcpy(pts, fCurrPoint, 2 * sizeof(SkPoint)); in next()
474 memcpy(pts, fCurrPoint, 3 * sizeof(SkPoint)); in next()
479 memcpy(pts, fCurrPoint, 4 * sizeof(SkPoint)); in next()
511 void sk_assert_monotonic_y(const SkPoint pts[], int count) { in sk_assert_monotonic_y() argument
513 assert_monotonic(&pts[0].fY, count); in sk_assert_monotonic_y()
517 void sk_assert_monotonic_x(const SkPoint pts[], int count) { in sk_assert_monotonic_x() argument
519 assert_monotonic(&pts[0].fX, count); in sk_assert_monotonic_x()