Lines Matching refs:x1

678 static int clip_1d(int *x0, int *y0, int *x1, int *y1, int maxdim) {  in clip_1d()  argument
682 if(*x1 < 0) { /* as is the end, so the line never cuts the window */ in clip_1d()
685 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
690 if (*x1 > maxdim) { in clip_1d()
691 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
692 *x1 = maxdim; in clip_1d()
697 if (*x1 > maxdim) { /* as is the end, so the line misses the window */ in clip_1d()
700 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
704 if (*x1 < 0) { in clip_1d()
705 *y1 -= (int)(m * *x1); in clip_1d()
706 *x1 = 0; in clip_1d()
711 if (*x1 > maxdim) { /* other end is outside to the right */ in clip_1d()
712 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
713 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
714 *x1 = maxdim; in clip_1d()
717 if (*x1 < 0) { /* other end is outside to the left */ in clip_1d()
718 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
719 *y1 -= (int)(m * *x1); in clip_1d()
720 *x1 = 0; in clip_1d()
804 int x1, y1, x2, y2; in gdImageBrushApply() local
815 x1 = x - hx; in gdImageBrushApply()
816 x2 = x1 + gdImageSX(im->brush); in gdImageBrushApply()
823 for (lx = x1; (lx < x2); lx++) { in gdImageBrushApply()
838 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
854 for (lx = x1; lx < x2; lx++) { in gdImageBrushApply()
1061 static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col) in gdImageHLine() argument
1065 gdImageFilledRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col); in gdImageHLine()
1067 if (x2 < x1) { in gdImageHLine()
1069 x2 = x1; in gdImageHLine()
1070 x1 = t; in gdImageHLine()
1073 for (;x1 <= x2; x1++) { in gdImageHLine()
1074 gdImageSetPixel(im, x1, y, col); in gdImageHLine()
1100 void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageLine() argument
1113 gdImageAALine(im, x1, y1, x2, y2, im->AA_color); in gdImageLine()
1118 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im))) { in gdImageLine()
1122 dx = abs (x2 - x1); in gdImageLine()
1126 gdImageVLine(im, x1, y1, y2, color); in gdImageLine()
1129 gdImageHLine(im, y1, x1, x2, color); in gdImageLine()
1154 if (x1 > x2) { in gdImageLine()
1158 xend = x1; in gdImageLine()
1160 x = x1; in gdImageLine()
1225 x = x1; in gdImageLine()
1236 if (((x2 - x1) * xdirflag) > 0) { in gdImageLine()
1296 void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) in gdImageAALine() argument
1306 x1 += (y1 * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1310 x2 += (y2 * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1319 x1 -= ((im->sy - y1) * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1323 x2 -= ((im->sy - y2) * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1328 if (x1 < 0 && x2 < 0) { in gdImageAALine()
1331 if (x1 < 0) { in gdImageAALine()
1332 y1 += (x1 * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1333 x1 = 0; in gdImageAALine()
1336 y2 += (x2 * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1340 if (x1 >= im->sx && x2 >= im->sx) { in gdImageAALine()
1343 if (x1 >= im->sx) { in gdImageAALine()
1344 y1 -= ((im->sx - x1) * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1345 x1 = im->sx - 1; in gdImageAALine()
1348 y2 -= ((im->sx - x2) * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1352 dx = x2 - x1; in gdImageAALine()
1360 tmp = x1; in gdImageAALine()
1361 x1 = x2; in gdImageAALine()
1366 dx = x2 - x1; in gdImageAALine()
1369 x = x1 << 16; in gdImageAALine()
1382 tmp = x1; in gdImageAALine()
1383 x1 = x2; in gdImageAALine()
1388 dx = x2 - x1; in gdImageAALine()
1391 x = x1 << 16; in gdImageAALine()
1407 void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageDashedLine() argument
1416 dx = abs(x2 - x1); in gdImageDashedLine()
1434 if (x1 > x2) { in gdImageDashedLine()
1438 xend = x1; in gdImageDashedLine()
1440 x = x1; in gdImageDashedLine()
1490 x = x1; in gdImageDashedLine()
1495 if (((x2 - x1) * xdirflag) > 0) { in gdImageDashedLine()
1875 int l, x1, x2, dy; in gdImageFill() local
1932 FILL_POP(y, x1, x2, dy); in gdImageFill()
1934 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
1937 if (x>=x1) { in gdImageFill()
1943 if (l<x1) { in gdImageFill()
1944 FILL_PUSH(y, l, x1-1, -dy); in gdImageFill()
1946 x = x1+1; in gdImageFill()
1970 int i, l, x1, x2, dy; in _gdImageFillTiled() local
2001 FILL_POP(y, x1, x2, dy); in _gdImageFillTiled()
2002 for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
2007 if (x>=x1) { in _gdImageFillTiled()
2013 if (l<x1) { in _gdImageFillTiled()
2014 FILL_PUSH(y, l, x1-1, -dy); in _gdImageFillTiled()
2016 x = x1+1; in _gdImageFillTiled()
2043 void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageRectangle() argument
2045 int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = y2, y2v = y2; in gdImageRectangle()
2049 if (x1 == x2 && y1 == y2 && thick == 1) { in gdImageRectangle()
2050 gdImageSetPixel(im, x1, y1, color); in gdImageRectangle()
2059 t = x1; in gdImageRectangle()
2060 x1 = x2; in gdImageRectangle()
2064 x1h = x1; x1v = x1; y1h = y1; y1v = y1; x2h = x2; x2v = x2; y2h = y2; y2v = y2; in gdImageRectangle()
2069 x1ul = x1 - half; in gdImageRectangle()
2118 void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageFilledRectangle() argument
2123 if (x1 == x2 && y1 == y2) { in gdImageFilledRectangle()
2124 gdImageSetPixel(im, x1, y1, color); in gdImageFilledRectangle()
2128 if (x1 > x2) { in gdImageFilledRectangle()
2129 x = x1; in gdImageFilledRectangle()
2130 x1 = x2; in gdImageFilledRectangle()
2140 if (x1 < 0) { in gdImageFilledRectangle()
2141 x1 = 0; in gdImageFilledRectangle()
2157 for (x = x1; (x <= x2); x++) { in gdImageFilledRectangle()
2572 typedef void (*image_line)(gdImagePtr im, int x1, int y1, int x2, int y2, int color); in gdImagePolygon()
2622 int x1, y1; in gdImageFilledPolygon() local
2691 x1 = p[ind1].x; in gdImageFilledPolygon()
2697 x1 = p[ind2].x; in gdImageFilledPolygon()
2706 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
2981 void gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) in gdImageSetClip() argument
2983 if (x1 < 0) { in gdImageSetClip()
2984 x1 = 0; in gdImageSetClip()
2986 if (x1 >= im->sx) { in gdImageSetClip()
2987 x1 = im->sx - 1; in gdImageSetClip()
3007 im->cx1 = x1; in gdImageSetClip()