Home | History | Annotate | Download | only in core

Lines Matching full:clip

87 bool SkLineClipper::IntersectLine(const SkPoint src[2], const SkRect& clip,
92 if (containsNoEmptyCheck(clip, bounds)) {
100 if (nestedLT(bounds.fRight, clip.fLeft, bounds.width()) ||
101 nestedLT(clip.fRight, bounds.fLeft, bounds.width()) ||
102 nestedLT(bounds.fBottom, clip.fTop, bounds.height()) ||
103 nestedLT(clip.fBottom, bounds.fTop, bounds.height())) {
121 if (tmp[index0].fY < clip.fTop) {
122 tmp[index0].set(sect_with_horizontal(src, clip.fTop), clip.fTop);
124 if (tmp[index1].fY > clip.fBottom) {
125 tmp[index1].set(sect_with_horizontal(src, clip.fBottom), clip.fBottom);
137 if ((tmp[index1].fX <= clip.fLeft || tmp[index0].fX >= clip.fRight) &&
143 if (tmp[index0].fX < clip.fLeft) {
144 tmp[index0].set(clip.fLeft, sect_with_vertical(src, clip.fLeft));
146 if (tmp[index1].fX > clip.fRight) {
147 tmp[index1].set(clip.fRight, sect_with_vertical(src, clip.fRight));
151 SkASSERT(containsNoEmptyCheck(clip, bounds));
187 int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip,
213 if (pts[index1].fY <= clip.fTop) { // we're above the clip
216 if (pts[index0].fY >= clip.fBottom) { // we're below the clip
226 if (pts[index0].fY < clip.fTop) {
227 tmp[index0].set(sect_with_horizontal(pts, clip.fTop), clip.fTop);
230 if (tmp[index1].fY > clip.fBottom) {
231 tmp[index1].set(sect_with_horizontal(pts, clip.fBottom), clip.fBottom);
235 // Chop it into 1..3 segments that are wholly within the clip in X.
253 if (tmp[index1].fX <= clip.fLeft) { // wholly to the left
254 tmp[0].fX = tmp[1].fX = clip.fLeft;
257 } else if (tmp[index0].fX >= clip.fRight) { // wholly to the right
258 tmp[0].fX = tmp[1].fX = clip.fRight;
265 if (tmp[index0].fX < clip.fLeft) {
266 r->set(clip.fLeft, tmp[index0].fY);
268 r->set(clip.fLeft, sect_with_vertical(tmp, clip.fLeft));
275 if (tmp[index1].fX > clip.fRight) {
276 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight));
279 r->set(clip.fRight, tmp[index1].fY);