• Home
  • Raw
  • Download

Lines Matching refs:clip

77 bool SkLineClipper::IntersectLine(const SkPoint src[2], const SkRect& clip,  in IntersectLine()  argument
82 if (containsNoEmptyCheck(clip, bounds)) { in IntersectLine()
90 if (nestedLT(bounds.fRight, clip.fLeft, bounds.width()) || in IntersectLine()
91 nestedLT(clip.fRight, bounds.fLeft, bounds.width()) || in IntersectLine()
92 nestedLT(bounds.fBottom, clip.fTop, bounds.height()) || in IntersectLine()
93 nestedLT(clip.fBottom, bounds.fTop, bounds.height())) { in IntersectLine()
111 if (tmp[index0].fY < clip.fTop) { in IntersectLine()
112 tmp[index0].set(sect_with_horizontal(src, clip.fTop), clip.fTop); in IntersectLine()
114 if (tmp[index1].fY > clip.fBottom) { in IntersectLine()
115 tmp[index1].set(sect_with_horizontal(src, clip.fBottom), clip.fBottom); in IntersectLine()
127 if ((tmp[index1].fX <= clip.fLeft || tmp[index0].fX >= clip.fRight) && in IntersectLine()
133 if (tmp[index0].fX < clip.fLeft) { in IntersectLine()
134 tmp[index0].set(clip.fLeft, sect_with_vertical(src, clip.fLeft)); in IntersectLine()
136 if (tmp[index1].fX > clip.fRight) { in IntersectLine()
137 tmp[index1].set(clip.fRight, sect_with_vertical(src, clip.fRight)); in IntersectLine()
141 SkASSERT(containsNoEmptyCheck(clip, bounds)); in IntersectLine()
175 int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip, SkPoint lines[], in ClipLine() argument
200 if (pts[index1].fY <= clip.fTop) { // we're above the clip in ClipLine()
203 if (pts[index0].fY >= clip.fBottom) { // we're below the clip in ClipLine()
213 if (pts[index0].fY < clip.fTop) { in ClipLine()
214 tmp[index0].set(sect_with_horizontal(pts, clip.fTop), clip.fTop); in ClipLine()
217 if (tmp[index1].fY > clip.fBottom) { in ClipLine()
218 tmp[index1].set(sect_with_horizontal(pts, clip.fBottom), clip.fBottom); in ClipLine()
240 if (tmp[index1].fX <= clip.fLeft) { // wholly to the left in ClipLine()
241 tmp[0].fX = tmp[1].fX = clip.fLeft; in ClipLine()
244 } else if (tmp[index0].fX >= clip.fRight) { // wholly to the right in ClipLine()
248 tmp[0].fX = tmp[1].fX = clip.fRight; in ClipLine()
255 if (tmp[index0].fX < clip.fLeft) { in ClipLine()
256 r->set(clip.fLeft, tmp[index0].fY); in ClipLine()
258 r->set(clip.fLeft, sect_with_vertical(tmp, clip.fLeft)); in ClipLine()
265 if (tmp[index1].fX > clip.fRight) { in ClipLine()
266 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight)); in ClipLine()
269 r->set(clip.fRight, tmp[index1].fY); in ClipLine()