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));
160 int SkLineClipper::ClipLine(const SkPoint pts[], const SkRect& clip, SkPoint lines[],
174 if (pts[index1].fY <= clip.fTop) { // we're above the clip
177 if (pts[index0].fY >= clip.fBottom) { // we're below the clip
187 if (pts[index0].fY < clip.fTop) {
188 tmp[index0].set(sect_with_horizontal(pts, clip.fTop), clip.fTop);
191 if (tmp[index1].fY > clip.fBottom) {
192 tmp[index1].set(sect_with_horizontal(pts, clip.fBottom), clip.fBottom);
196 // Chop it into 1..3 segments that are wholly within the clip in X.
214 if (tmp[index1].fX <= clip.fLeft) { // wholly to the left
215 tmp[0].fX = tmp[1].fX = clip.fLeft;
218 } else if (tmp[index0].fX >= clip.fRight) { // wholly to the right
222 tmp[0].fX = tmp[1].fX = clip.fRight;
229 if (tmp[index0].fX < clip.fLeft) {
230 r->set(clip.fLeft, tmp[index0].fY);
232 r->set(clip.fLeft, sect_with_vertical(tmp, clip.fLeft));
239 if (tmp[index1].fX > clip.fRight) {
240 r->set(clip.fRight, sect_with_vertical(tmp, clip.fRight));
243 r->set(clip.fRight, tmp[index1].fY);