Lines Matching refs:x1

684 static int clip_1d(int *x0, int *y0, int *x1, int *y1, int maxdim) {  in clip_1d()  argument
688 if(*x1 < 0) { /* as is the end, so the line never cuts the window */ in clip_1d()
691 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
696 if (*x1 > maxdim) { in clip_1d()
697 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
698 *x1 = maxdim; in clip_1d()
703 if (*x1 > maxdim) { /* as is the end, so the line misses the window */ in clip_1d()
706 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
710 if (*x1 < 0) { in clip_1d()
711 *y1 -= (int)(m * *x1); in clip_1d()
712 *x1 = 0; in clip_1d()
717 if (*x1 > maxdim) { /* other end is outside to the right */ in clip_1d()
718 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
719 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
720 *x1 = maxdim; in clip_1d()
723 if (*x1 < 0) { /* other end is outside to the left */ in clip_1d()
724 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
725 *y1 -= (int)(m * *x1); in clip_1d()
726 *x1 = 0; in clip_1d()
813 int x1, y1, x2, y2; in gdImageBrushApply() local
824 x1 = x - hx; in gdImageBrushApply()
825 x2 = x1 + gdImageSX(im->brush); in gdImageBrushApply()
832 for (lx = x1; (lx < x2); lx++) { in gdImageBrushApply()
847 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
863 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
969 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
1055 static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col) in gdImageHLine() argument
1059 _gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col); in gdImageHLine()
1061 if (x2 < x1) { in gdImageHLine()
1063 x2 = x1; in gdImageHLine()
1064 x1 = t; in gdImageHLine()
1067 for (;x1 <= x2; x1++) { in gdImageHLine()
1068 gdImageSetPixel(im, x1, y, col); in gdImageHLine()
1094 void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageLine() argument
1107 gdImageAALine(im, x1, y1, x2, y2, im->AA_color); in gdImageLine()
1112 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) { in gdImageLine()
1116 dx = abs (x2 - x1); in gdImageLine()
1120 gdImageVLine(im, x1, y1, y2, color); in gdImageLine()
1123 gdImageHLine(im, y1, x1, x2, color); in gdImageLine()
1148 if (x1 > x2) { in gdImageLine()
1152 xend = x1; in gdImageLine()
1154 x = x1; in gdImageLine()
1219 x = x1; in gdImageLine()
1230 if (((x2 - x1) * xdirflag) > 0) { in gdImageLine()
1290 void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) in gdImageAALine() argument
1298 gdImageLine(im, x1, y1, x2, y2, col); in gdImageAALine()
1303 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) { in gdImageAALine()
1307 dx = x2 - x1; in gdImageAALine()
1315 tmp = x1; in gdImageAALine()
1316 x1 = x2; in gdImageAALine()
1321 dx = x2 - x1; in gdImageAALine()
1327 for (x = x1; x <= x2; x++) { in gdImageAALine()
1343 tmp = x1; in gdImageAALine()
1344 x1 = x2; in gdImageAALine()
1349 dx = x2 - x1; in gdImageAALine()
1352 x = x1; in gdImageAALine()
1374 void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageDashedLine() argument
1383 dx = abs(x2 - x1); in gdImageDashedLine()
1400 if (x1 > x2) { in gdImageDashedLine()
1404 xend = x1; in gdImageDashedLine()
1406 x = x1; in gdImageDashedLine()
1456 x = x1; in gdImageDashedLine()
1461 if (((x2 - x1) * xdirflag) > 0) { in gdImageDashedLine()
1970 int l, x1, x2, dy; in gdImageFill() local
2027 FILL_POP(y, x1, x2, dy); in gdImageFill()
2029 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
2032 if (x>=x1) { in gdImageFill()
2038 if (l<x1) { in gdImageFill()
2039 FILL_PUSH(y, l, x1-1, -dy); in gdImageFill()
2041 x = x1+1; in gdImageFill()
2066 int i, l, x1, x2, dy; in _gdImageFillTiled() local
2097 FILL_POP(y, x1, x2, dy); in _gdImageFillTiled()
2098 for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
2103 if (x>=x1) { in _gdImageFillTiled()
2109 if (l<x1) { in _gdImageFillTiled()
2110 FILL_PUSH(y, l, x1-1, -dy); in _gdImageFillTiled()
2112 x = x1+1; in _gdImageFillTiled()
2140 void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageRectangle() argument
2145 if (x1 == x2 && y1 == y2 && thick == 1) { in gdImageRectangle()
2146 gdImageSetPixel(im, x1, y1, color); in gdImageRectangle()
2156 if (x2 < x1) { in gdImageRectangle()
2157 t = x1; in gdImageRectangle()
2158 x1 = x2; in gdImageRectangle()
2166 x1ul = x1 - half; in gdImageRectangle()
2206 if (x1 == x2 || y1 == y2) { in gdImageRectangle()
2207 gdImageLine(im, x1, y1, x2, y2, color); in gdImageRectangle()
2209 gdImageLine(im, x1, y1, x2, y1, color); in gdImageRectangle()
2210 gdImageLine(im, x1, y2, x2, y2, color); in gdImageRectangle()
2211 gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color); in gdImageRectangle()
2217 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledHRectangle() argument
2221 if (x1 == x2 && y1 == y2) { in _gdImageFilledHRectangle()
2222 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledHRectangle()
2226 if (x1 > x2) { in _gdImageFilledHRectangle()
2227 x = x1; in _gdImageFilledHRectangle()
2228 x1 = x2; in _gdImageFilledHRectangle()
2238 if (x1 < 0) { in _gdImageFilledHRectangle()
2239 x1 = 0; in _gdImageFilledHRectangle()
2254 for (x = x1; (x <= x2); x++) { in _gdImageFilledHRectangle()
2261 static void _gdImageFilledVRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledVRectangle() argument
2265 if (x1 == x2 && y1 == y2) { in _gdImageFilledVRectangle()
2266 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledVRectangle()
2270 if (x1 > x2) { in _gdImageFilledVRectangle()
2271 x = x1; in _gdImageFilledVRectangle()
2272 x1 = x2; in _gdImageFilledVRectangle()
2282 if (x1 < 0) { in _gdImageFilledVRectangle()
2283 x1 = 0; in _gdImageFilledVRectangle()
2299 for (x = x1; (x <= x2); x++) { in _gdImageFilledVRectangle()
2305 void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageFilledRectangle() argument
2307 _gdImageFilledVRectangle(im, x1, y1, x2, y2, color); in gdImageFilledRectangle()
2733 int x1, y1; in gdImageFilledPolygon() local
2778 x1 = x2 = p[0].x; in gdImageFilledPolygon()
2780 if (p[i].x < x1) { in gdImageFilledPolygon()
2781 x1 = p[i].x; in gdImageFilledPolygon()
2786 gdImageLine(im, x1, miny, x2, miny, c); in gdImageFilledPolygon()
2815 x1 = p[ind1].x; in gdImageFilledPolygon()
2821 x1 = p[ind2].x; in gdImageFilledPolygon()
2830 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
3100 void gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) in gdImageSetClip() argument
3102 if (x1 < 0) { in gdImageSetClip()
3103 x1 = 0; in gdImageSetClip()
3105 if (x1 >= im->sx) { in gdImageSetClip()
3106 x1 = im->sx - 1; in gdImageSetClip()
3126 im->cx1 = x1; in gdImageSetClip()