• Home
  • Raw
  • Download

Lines Matching refs:pts

53     const SkPoint pts[] = { p0, p1 };  in clipLine()  local
54 int lineCount = SkLineClipper::ClipLine(pts, clip, lines, fCanCullToTheRight); in clipLine()
86 static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar* t) { in chopMonoQuadAtY()
87 return chopMonoQuadAt(pts[0].fY, pts[1].fY, pts[2].fY, y, t); in chopMonoQuadAtY()
90 static bool chopMonoQuadAtX(SkPoint pts[3], SkScalar x, SkScalar* t) { in chopMonoQuadAtX()
91 return chopMonoQuadAt(pts[0].fX, pts[1].fX, pts[2].fX, x, t); in chopMonoQuadAtX()
95 static void chop_quad_in_Y(SkPoint pts[3], const SkRect& clip) { in chop_quad_in_Y()
100 if (pts[0].fY < clip.fTop) { in chop_quad_in_Y()
101 if (chopMonoQuadAtY(pts, clip.fTop, &t)) { in chop_quad_in_Y()
103 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y()
108 pts[0] = tmp[2]; in chop_quad_in_Y()
109 pts[1] = tmp[3]; in chop_quad_in_Y()
114 if (pts[i].fY < clip.fTop) { in chop_quad_in_Y()
115 pts[i].fY = clip.fTop; in chop_quad_in_Y()
122 if (pts[2].fY > clip.fBottom) { in chop_quad_in_Y()
123 if (chopMonoQuadAtY(pts, clip.fBottom, &t)) { in chop_quad_in_Y()
124 SkChopQuadAt(pts, tmp, t); in chop_quad_in_Y()
129 pts[1] = tmp[1]; in chop_quad_in_Y()
130 pts[2] = tmp[2]; in chop_quad_in_Y()
135 if (pts[i].fY > clip.fBottom) { in chop_quad_in_Y()
136 pts[i].fY = clip.fBottom; in chop_quad_in_Y()
145 SkPoint pts[3]; in clipMonoQuad() local
146 bool reverse = sort_increasing_Y(pts, srcPts, 3); in clipMonoQuad()
149 if (pts[2].fY <= clip.fTop || pts[0].fY >= clip.fBottom) { in clipMonoQuad()
154 chop_quad_in_Y(pts, clip); in clipMonoQuad()
156 if (pts[0].fX > pts[2].fX) { in clipMonoQuad()
158 swap(pts[0], pts[2]); in clipMonoQuad()
161 SkASSERT(pts[0].fX <= pts[1].fX); in clipMonoQuad()
162 SkASSERT(pts[1].fX <= pts[2].fX); in clipMonoQuad()
166 if (pts[2].fX <= clip.fLeft) { // wholly to the left in clipMonoQuad()
167 this->appendVLine(clip.fLeft, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
170 if (pts[0].fX >= clip.fRight) { // wholly to the right in clipMonoQuad()
172 this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
181 if (pts[0].fX < clip.fLeft) { in clipMonoQuad()
182 if (chopMonoQuadAtX(pts, clip.fLeft, &t)) { in clipMonoQuad()
183 SkChopQuadAt(pts, tmp, t); in clipMonoQuad()
189 pts[0] = tmp[2]; in clipMonoQuad()
190 pts[1] = tmp[3]; in clipMonoQuad()
194 this->appendVLine(clip.fLeft, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
200 if (pts[2].fX > clip.fRight) { in clipMonoQuad()
201 if (chopMonoQuadAtX(pts, clip.fRight, &t)) { in clipMonoQuad()
202 SkChopQuadAt(pts, tmp, t); in clipMonoQuad()
212 this->appendVLine(clip.fRight, pts[0].fY, pts[2].fY, reverse); in clipMonoQuad()
215 this->appendQuad(pts, reverse); in clipMonoQuad()
281 static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { in chop_cubic_in_Y()
284 if (pts[0].fY < clip.fTop) { in chop_cubic_in_Y()
286 chop_mono_cubic_at_y(pts, clip.fTop, tmp); in chop_cubic_in_Y()
309 pts[0] = tmp[3]; in chop_cubic_in_Y()
310 pts[1] = tmp[4]; in chop_cubic_in_Y()
311 pts[2] = tmp[5]; in chop_cubic_in_Y()
315 if (pts[3].fY > clip.fBottom) { in chop_cubic_in_Y()
317 chop_mono_cubic_at_y(pts, clip.fBottom, tmp); in chop_cubic_in_Y()
321 pts[1] = tmp[1]; in chop_cubic_in_Y()
322 pts[2] = tmp[2]; in chop_cubic_in_Y()
323 pts[3] = tmp[3]; in chop_cubic_in_Y()
336 SkPoint pts[4]; in clipMonoCubic() local
337 bool reverse = sort_increasing_Y(pts, src, 4); in clipMonoCubic()
340 if (pts[3].fY <= clip.fTop || pts[0].fY >= clip.fBottom) { in clipMonoCubic()
345 chop_cubic_in_Y(pts, clip); in clipMonoCubic()
347 if (pts[0].fX > pts[3].fX) { in clipMonoCubic()
349 swap(pts[0], pts[3]); in clipMonoCubic()
350 swap(pts[1], pts[2]); in clipMonoCubic()
356 if (pts[3].fX <= clip.fLeft) { // wholly to the left in clipMonoCubic()
357 this->appendVLine(clip.fLeft, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
360 if (pts[0].fX >= clip.fRight) { // wholly to the right in clipMonoCubic()
362 this->appendVLine(clip.fRight, pts[0].fY, pts[3].fY, reverse); in clipMonoCubic()
368 if (pts[0].fX < clip.fLeft) { in clipMonoCubic()
370 chop_mono_cubic_at_x(pts, clip.fLeft, tmp); in clipMonoCubic()
379 pts[0] = tmp[3]; in clipMonoCubic()
380 pts[1] = tmp[4]; in clipMonoCubic()
381 pts[2] = tmp[5]; in clipMonoCubic()
385 if (pts[3].fX > clip.fRight) { in clipMonoCubic()
387 chop_mono_cubic_at_x(pts, clip.fRight, tmp); in clipMonoCubic()
394 this->appendCubic(pts, reverse); in clipMonoCubic()
398 static SkRect compute_cubic_bounds(const SkPoint pts[4]) { in compute_cubic_bounds()
400 r.set(pts, 4); in compute_cubic_bounds()
472 void SkEdgeClipper::appendQuad(const SkPoint pts[3], bool reverse) { in appendQuad()
476 fCurrPoint[0] = pts[2]; in appendQuad()
477 fCurrPoint[2] = pts[0]; in appendQuad()
479 fCurrPoint[0] = pts[0]; in appendQuad()
480 fCurrPoint[2] = pts[2]; in appendQuad()
482 fCurrPoint[1] = pts[1]; in appendQuad()
486 void SkEdgeClipper::appendCubic(const SkPoint pts[4], bool reverse) { in appendCubic()
491 fCurrPoint[i] = pts[3 - i]; in appendCubic()
494 memcpy(fCurrPoint, pts, 4 * sizeof(SkPoint)); in appendCubic()
499 SkPath::Verb SkEdgeClipper::next(SkPoint pts[]) { in next() argument
504 memcpy(pts, fCurrPoint, 2 * sizeof(SkPoint)); in next()
509 memcpy(pts, fCurrPoint, 3 * sizeof(SkPoint)); in next()
514 memcpy(pts, fCurrPoint, 4 * sizeof(SkPoint)); in next()
546 void sk_assert_monotonic_y(const SkPoint pts[], int count) { in sk_assert_monotonic_y() argument
548 assert_monotonic(&pts[0].fY, count); in sk_assert_monotonic_y()
552 void sk_assert_monotonic_x(const SkPoint pts[], int count) { in sk_assert_monotonic_x() argument
554 assert_monotonic(&pts[0].fX, count); in sk_assert_monotonic_x()