Lines Matching refs:x1
686 static int clip_1d(int *x0, int *y0, int *x1, int *y1, int mindim, int maxdim) { in clip_1d() argument
690 if(*x1 < mindim) { /* as is the end, so the line never cuts the window */ in clip_1d()
693 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
698 if (*x1 > maxdim) { in clip_1d()
699 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
700 *x1 = maxdim; in clip_1d()
705 if (*x1 > maxdim) { /* as is the end, so the line misses the window */ in clip_1d()
708 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
712 if (*x1 < mindim) { in clip_1d()
713 *y1 -= (int)(m * (*x1 - mindim)); in clip_1d()
714 *x1 = mindim; in clip_1d()
719 if (*x1 > maxdim) { /* other end is outside to the right */ in clip_1d()
720 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
721 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
722 *x1 = maxdim; in clip_1d()
725 if (*x1 < mindim) { /* other end is outside to the left */ in clip_1d()
726 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
727 *y1 -= (int)(m * (*x1 - mindim)); in clip_1d()
728 *x1 = mindim; in clip_1d()
815 int x1, y1, x2, y2; in gdImageBrushApply() local
826 x1 = x - hx; in gdImageBrushApply()
827 x2 = x1 + gdImageSX(im->brush); in gdImageBrushApply()
834 for (lx = x1; (lx < x2); lx++) { in gdImageBrushApply()
849 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
865 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
973 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
1059 static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col) in gdImageHLine() argument
1063 _gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col); in gdImageHLine()
1065 if (x2 < x1) { in gdImageHLine()
1067 x2 = x1; in gdImageHLine()
1068 x1 = t; in gdImageHLine()
1071 for (;x1 <= x2; x1++) { in gdImageHLine()
1072 gdImageSetPixel(im, x1, y, col); in gdImageHLine()
1098 void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageLine() argument
1111 gdImageAALine(im, x1, y1, x2, y2, im->AA_color); in gdImageLine()
1120 if (clip_1d (&x1, &y1, &x2, &y2, im->cx1, im->cx2) == 0) in gdImageLine()
1122 if (clip_1d (&y1, &x1, &y2, &x2, im->cy1, im->cy2) == 0) in gdImageLine()
1125 dx = abs (x2 - x1); in gdImageLine()
1129 gdImageVLine(im, x1, y1, y2, color); in gdImageLine()
1132 gdImageHLine(im, y1, x1, x2, color); in gdImageLine()
1157 if (x1 > x2) { in gdImageLine()
1161 xend = x1; in gdImageLine()
1163 x = x1; in gdImageLine()
1228 x = x1; in gdImageLine()
1239 if (((x2 - x1) * xdirflag) > 0) { in gdImageLine()
1299 void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) in gdImageAALine() argument
1307 gdImageLine(im, x1, y1, x2, y2, col); in gdImageAALine()
1312 if (clip_1d (&x1, &y1, &x2, &y2, im->cx1, im->cx2) == 0) in gdImageAALine()
1314 if (clip_1d (&y1, &x1, &y2, &x2, im->cy1, im->cy2) == 0) in gdImageAALine()
1317 dx = x2 - x1; in gdImageAALine()
1325 tmp = x1; in gdImageAALine()
1326 x1 = x2; in gdImageAALine()
1331 dx = x2 - x1; in gdImageAALine()
1337 for (x = x1; x <= x2; x++) { in gdImageAALine()
1353 tmp = x1; in gdImageAALine()
1354 x1 = x2; in gdImageAALine()
1359 dx = x2 - x1; in gdImageAALine()
1362 x = x1; in gdImageAALine()
1384 void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageDashedLine() argument
1393 dx = abs(x2 - x1); in gdImageDashedLine()
1410 if (x1 > x2) { in gdImageDashedLine()
1414 xend = x1; in gdImageDashedLine()
1416 x = x1; in gdImageDashedLine()
1466 x = x1; in gdImageDashedLine()
1471 if (((x2 - x1) * xdirflag) > 0) { in gdImageDashedLine()
1980 int l, x1, x2, dy; in gdImageFill() local
2045 FILL_POP(y, x1, x2, dy); in gdImageFill()
2047 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
2050 if (x>=x1) { in gdImageFill()
2056 if (l<x1) { in gdImageFill()
2057 FILL_PUSH(y, l, x1-1, -dy); in gdImageFill()
2059 x = x1+1; in gdImageFill()
2084 int l, x1, x2, dy; in _gdImageFillTiled() local
2120 FILL_POP(y, x1, x2, dy); in _gdImageFillTiled()
2121 for (x=x1; x>=0 && (!pts[y + x*wy2] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
2126 if (x>=x1) { in _gdImageFillTiled()
2132 if (l<x1) { in _gdImageFillTiled()
2133 FILL_PUSH(y, l, x1-1, -dy); in _gdImageFillTiled()
2135 x = x1+1; in _gdImageFillTiled()
2159 void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageRectangle() argument
2164 if (x1 == x2 && y1 == y2 && thick == 1) { in gdImageRectangle()
2165 gdImageSetPixel(im, x1, y1, color); in gdImageRectangle()
2175 if (x2 < x1) { in gdImageRectangle()
2176 t = x1; in gdImageRectangle()
2177 x1 = x2; in gdImageRectangle()
2185 x1ul = x1 - half; in gdImageRectangle()
2225 if (x1 == x2 || y1 == y2) { in gdImageRectangle()
2226 gdImageLine(im, x1, y1, x2, y2, color); in gdImageRectangle()
2228 gdImageLine(im, x1, y1, x2, y1, color); in gdImageRectangle()
2229 gdImageLine(im, x1, y2, x2, y2, color); in gdImageRectangle()
2230 gdImageLine(im, x1, y1 + 1, x1, y2 - 1, color); in gdImageRectangle()
2236 static void _gdImageFilledHRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledHRectangle() argument
2240 if (x1 == x2 && y1 == y2) { in _gdImageFilledHRectangle()
2241 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledHRectangle()
2245 if (x1 > x2) { in _gdImageFilledHRectangle()
2246 x = x1; in _gdImageFilledHRectangle()
2247 x1 = x2; in _gdImageFilledHRectangle()
2257 if (x1 < 0) { in _gdImageFilledHRectangle()
2258 x1 = 0; in _gdImageFilledHRectangle()
2273 for (x = x1; (x <= x2); x++) { in _gdImageFilledHRectangle()
2280 static void _gdImageFilledVRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in _gdImageFilledVRectangle() argument
2284 if (x1 == x2 && y1 == y2) { in _gdImageFilledVRectangle()
2285 gdImageSetPixel(im, x1, y1, color); in _gdImageFilledVRectangle()
2289 if (x1 > x2) { in _gdImageFilledVRectangle()
2290 x = x1; in _gdImageFilledVRectangle()
2291 x1 = x2; in _gdImageFilledVRectangle()
2301 if (x1 < 0) { in _gdImageFilledVRectangle()
2302 x1 = 0; in _gdImageFilledVRectangle()
2318 for (x = x1; (x <= x2); x++) { in _gdImageFilledVRectangle()
2324 void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageFilledRectangle() argument
2326 _gdImageFilledVRectangle(im, x1, y1, x2, y2, color); in gdImageFilledRectangle()
2752 int x1, y1; in gdImageFilledPolygon() local
2797 x1 = x2 = p[0].x; in gdImageFilledPolygon()
2799 if (p[i].x < x1) { in gdImageFilledPolygon()
2800 x1 = p[i].x; in gdImageFilledPolygon()
2805 gdImageLine(im, x1, miny, x2, miny, c); in gdImageFilledPolygon()
2834 x1 = p[ind1].x; in gdImageFilledPolygon()
2840 x1 = p[ind2].x; in gdImageFilledPolygon()
2849 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
3127 void gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) in gdImageSetClip() argument
3129 if (x1 < 0) { in gdImageSetClip()
3130 x1 = 0; in gdImageSetClip()
3132 if (x1 >= im->sx) { in gdImageSetClip()
3133 x1 = im->sx - 1; in gdImageSetClip()
3153 im->cx1 = x1; in gdImageSetClip()