Home | History | Annotate | Download | only in core

Lines Matching refs:clip

77 bool SkLineClipper::IntersectLine(const SkPoint src[2], const SkRect& clip,
82 if (containsNoEmptyCheck(clip, bounds)) {
90 if (nestedLT(bounds.fRight, clip.fLeft, bounds.width()) ||
91 nestedLT(clip.fRight, bounds.fLeft, bounds.width()) ||
92 nestedLT(bounds.fBottom, clip.fTop, bounds.height()) ||
93 nestedLT(clip.fBottom, bounds.fTop, bounds.height())) {
111 if (tmp[index0].fY < clip.fTop) {
112 tmp[index0].set(sect_with_horizontal(src, clip.fTop), clip.fTop);
114 if (tmp[index1].fY > clip.fBottom) {
115 tmp[index1].set(sect_with_horizontal(src, clip.fBottom), clip.fBottom);
127 if ((tmp[index1].fX <= clip.fLeft || tmp[index0].fX >= clip.fRight) &&
133 if (tmp[index0].fX < clip.fLeft) {
134 tmp[index0].set(clip.fLeft, sect_with_vertical(src, clip.fLeft));
136 if (tmp[index1].fX > clip.fRight) {
137 tmp[index1].set(clip.fRight, sect_with_vertical(src, clip.fRight));
141 SkASSERT(containsNoEmptyCheck(clip, bounds));
175 int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip,
199 if (pts[index1].fY <= clip.fTop) { // we're above the clip
202 if (pts[index0].fY >= clip.fBottom) { // we're below the clip
212 if (pts[index0].fY < clip.fTop) {
213 tmp[index0].set(sect_with_horizontal(pts, clip.fTop), clip.fTop);
216 if (tmp[index1].fY > clip.fBottom) {
217 tmp[index1].set(sect_with_horizontal(pts, clip.fBottom), clip.fBottom);
221 // Chop it into 1..3 segments that are wholly within the clip in X.
239 if (tmp[index1].fX <= clip.fLeft) { // wholly to the left
240 tmp[0].fX = tmp[1].fX = clip.fLeft;
243 } else if (tmp[index0].fX >= clip.fRight) { // wholly to the right
244 tmp[0].fX = tmp[1].fX = clip.fRight;
251 if (tmp[index0].fX < clip.fLeft) {
252 r->set(clip.fLeft, tmp[index0].fY);
254 r->set(clip.fLeft, sect_with_vertical(tmp, clip.fLeft));
261 if (tmp[index1].fX > clip.fRight) {
262 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight));
265 r->set(clip.fRight, tmp[index1].fY);