Lines Matching refs:x1
714 static int clip_1d(int *x0, int *y0, int *x1, int *y1, int maxdim) { in clip_1d() argument
718 if(*x1 < 0) { /* as is the end, so the line never cuts the window */ in clip_1d()
721 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
726 if (*x1 > maxdim) { in clip_1d()
727 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
728 *x1 = maxdim; in clip_1d()
733 if (*x1 > maxdim) { /* as is the end, so the line misses the window */ in clip_1d()
736 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
740 if (*x1 < 0) { in clip_1d()
741 *y1 -= (int)(m * *x1); in clip_1d()
742 *x1 = 0; in clip_1d()
747 if (*x1 > maxdim) { /* other end is outside to the right */ in clip_1d()
748 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
749 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
750 *x1 = maxdim; in clip_1d()
753 if (*x1 < 0) { /* other end is outside to the left */ in clip_1d()
754 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
755 *y1 -= (int)(m * *x1); in clip_1d()
756 *x1 = 0; in clip_1d()
843 int x1, y1, x2, y2; in gdImageBrushApply() local
854 x1 = x - hx; in gdImageBrushApply()
855 x2 = x1 + gdImageSX(im->brush); in gdImageBrushApply()
862 for (lx = x1; (lx < x2); lx++) { in gdImageBrushApply()
877 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
893 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
999 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
1001 static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col) in gdImageHLine() argument
1005 _gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col); in gdImageHLine()
1007 if (x2 < x1) { in gdImageHLine()
1009 x2 = x1; in gdImageHLine()
1010 x1 = t; in gdImageHLine()
1013 for (;x1 <= x2; x1++) { in gdImageHLine()
1014 gdImageSetPixel(im, x1, y, col); in gdImageHLine()
1040 void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageLine() argument
1053 gdImageAALine(im, x1, y1, x2, y2, im->AA_color); in gdImageLine()
1058 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) { in gdImageLine()
1062 dx = abs (x2 - x1); in gdImageLine()
1066 gdImageVLine(im, x1, y1, y2, color); in gdImageLine()
1069 gdImageHLine(im, y1, x1, x2, color); in gdImageLine()
1094 if (x1 > x2) { in gdImageLine()
1098 xend = x1; in gdImageLine()
1100 x = x1; in gdImageLine()
1165 x = x1; in gdImageLine()
1176 if (((x2 - x1) * xdirflag) > 0) { in gdImageLine()
1236 void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) in gdImageAALine() argument
1244 gdImageLine(im, x1, y1, x2, y2, col); in gdImageAALine()
1249 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)-1) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im)-1)) { in gdImageAALine()
1253 dx = x2 - x1; in gdImageAALine()
1261 tmp = x1; in gdImageAALine()
1262 x1 = x2; in gdImageAALine()
1267 dx = x2 - x1; in gdImageAALine()
1273 for (x = x1; x <= x2; x++) { in gdImageAALine()
1289 tmp = x1; in gdImageAALine()
1290 x1 = x2; in gdImageAALine()
1295 dx = x2 - x1; in gdImageAALine()
1298 x = x1; in gdImageAALine()
1320 void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageDashedLine() argument
1329 dx = abs(x2 - x1); in gdImageDashedLine()
1346 if (x1 > x2) { in gdImageDashedLine()
1350 xend = x1; in gdImageDashedLine()
1352 x = x1; in gdImageDashedLine()
1402 x = x1; in gdImageDashedLine()
1407 if (((x2 - x1) * xdirflag) > 0) { in gdImageDashedLine()
1916 int l, x1, x2, dy; in gdImageFill() local
1973 FILL_POP(y, x1, x2, dy); in gdImageFill()
1975 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
1978 if (x>=x1) { in gdImageFill()
1984 if (l<x1) { in gdImageFill()
1985 FILL_PUSH(y, l, x1-1, -dy); in gdImageFill()
1987 x = x1+1; in gdImageFill()
2012 int i, l, x1, x2, dy; in _gdImageFillTiled() local
2043 FILL_POP(y, x1, x2, dy); in _gdImageFillTiled()
2044 for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
2049 if (x>=x1) { in _gdImageFillTiled()
2055 if (l<x1) { in _gdImageFillTiled()
2056 FILL_PUSH(y, l, x1-1, -dy); in _gdImageFillTiled()
2058 x = x1+1; in _gdImageFillTiled()
2086 void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageRectangle() argument
2091 if (x1 == x2 && y1 == y2 && thick == 1) { in gdImageRectangle()
2092 gdImageSetPixel(im, x1, y1, color); in gdImageRectangle()
2102 if (x2 < x1) { in gdImageRectangle()
2103 t = x1; in gdImageRectangle()
2104 x1 = x2; in gdImageRectangle()
2112 x1ul = x1 - half; in gdImageRectangle()
2152 if (x1 == x2 || y1 == y2) { in gdImageRectangle()
2153 gdImageLine(im, x1, y1, x2, y2, color); in gdImageRectangle()
2155 gdImageLine(im, x1, y1, x2, y1, color); in gdImageRectangle()
2156 gdImageLine(im, x1, y2, x2, y2, color); in gdImageRectangle()
2157 gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color); in gdImageRectangle()
2163 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledHRectangle() argument
2167 if (x1 == x2 && y1 == y2) { in _gdImageFilledHRectangle()
2168 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledHRectangle()
2172 if (x1 > x2) { in _gdImageFilledHRectangle()
2173 x = x1; in _gdImageFilledHRectangle()
2174 x1 = x2; in _gdImageFilledHRectangle()
2184 if (x1 < 0) { in _gdImageFilledHRectangle()
2185 x1 = 0; in _gdImageFilledHRectangle()
2200 for (x = x1; (x <= x2); x++) { in _gdImageFilledHRectangle()
2207 static void _gdImageFilledVRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledVRectangle() argument
2211 if (x1 == x2 && y1 == y2) { in _gdImageFilledVRectangle()
2212 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledVRectangle()
2216 if (x1 > x2) { in _gdImageFilledVRectangle()
2217 x = x1; in _gdImageFilledVRectangle()
2218 x1 = x2; in _gdImageFilledVRectangle()
2228 if (x1 < 0) { in _gdImageFilledVRectangle()
2229 x1 = 0; in _gdImageFilledVRectangle()
2245 for (x = x1; (x <= x2); x++) { in _gdImageFilledVRectangle()
2251 void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageFilledRectangle() argument
2253 _gdImageFilledVRectangle(im, x1, y1, x2, y2, color); in gdImageFilledRectangle()
2679 int x1, y1; in gdImageFilledPolygon() local
2724 x1 = x2 = p[0].x; in gdImageFilledPolygon()
2726 if (p[i].x < x1) { in gdImageFilledPolygon()
2727 x1 = p[i].x; in gdImageFilledPolygon()
2732 gdImageLine(im, x1, miny, x2, miny, c); in gdImageFilledPolygon()
2761 x1 = p[ind1].x; in gdImageFilledPolygon()
2767 x1 = p[ind2].x; in gdImageFilledPolygon()
2776 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
3046 void gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) in gdImageSetClip() argument
3048 if (x1 < 0) { in gdImageSetClip()
3049 x1 = 0; in gdImageSetClip()
3051 if (x1 >= im->sx) { in gdImageSetClip()
3052 x1 = im->sx - 1; in gdImageSetClip()
3072 im->cx1 = x1; in gdImageSetClip()