Lines Matching refs:y1
667 static int clip_1d(int *x0, int *y0, int *x1, int *y1, int maxdim) { in clip_1d() argument
674 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
680 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
689 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
694 *y1 -= (int)(m * *x1); in clip_1d()
701 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
702 *y1 += (int)(m * (maxdim - *x1)); in clip_1d()
707 m = (*y1 - *y0)/(double)(*x1 - *x0); /* calculate the slope of the line */ in clip_1d()
708 *y1 -= (int)(m * *x1); in clip_1d()
793 int x1, y1, x2, y2; in gdImageBrushApply() local
801 y1 = y - hy; in gdImageBrushApply()
802 y2 = y1 + gdImageSY(im->brush); in gdImageBrushApply()
810 for (ly = y1; ly < y2; ly++) { in gdImageBrushApply()
825 for (ly = y1; ly < y2; ly++) { in gdImageBrushApply()
841 for (ly = y1; ly < y2; ly++) { in gdImageBrushApply()
1069 static void gdImageVLine(gdImagePtr im, int x, int y1, int y2, int col) in gdImageVLine() argument
1073 gdImageFilledRectangle(im, x - thickhalf, y1, x + im->thick - thickhalf - 1, y2, col); in gdImageVLine()
1075 if (y2 < y1) { in gdImageVLine()
1076 int t = y1; in gdImageVLine()
1077 y1 = y2; in gdImageVLine()
1081 for (;y1 <= y2; y1++) { in gdImageVLine()
1082 gdImageSetPixel(im, x, y1, col); in gdImageVLine()
1089 void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageLine() argument
1102 gdImageAALine(im, x1, y1, x2, y2, im->AA_color); in gdImageLine()
1107 if (!clip_1d(&x1,&y1,&x2,&y2,gdImageSX(im)) || !clip_1d(&y1,&x1,&y2,&x2,gdImageSY(im))) { in gdImageLine()
1112 dy = abs (y2 - y1); in gdImageLine()
1115 gdImageVLine(im, x1, y1, y2, color); in gdImageLine()
1118 gdImageHLine(im, y1, x1, x2, color); in gdImageLine()
1150 y = y1; in gdImageLine()
1161 if (((y2 - y1) * ydirflag) > 0) { in gdImageLine()
1207 if (y1 > y2) { in gdImageLine()
1210 yend = y1; in gdImageLine()
1213 y = y1; in gdImageLine()
1285 void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) in gdImageAALine() argument
1291 if (y1 < 0 && y2 < 0) { in gdImageAALine()
1294 if (y1 < 0) { in gdImageAALine()
1295 x1 += (y1 * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1296 y1 = 0; in gdImageAALine()
1299 x2 += (y2 * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1304 if (y1 >= im->sy && y2 >= im->sy) { in gdImageAALine()
1307 if (y1 >= im->sy) { in gdImageAALine()
1308 x1 -= ((im->sy - y1) * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1309 y1 = im->sy - 1; in gdImageAALine()
1312 x2 -= ((im->sy - y2) * (x1 - x2)) / (y2 - y1); in gdImageAALine()
1321 y1 += (x1 * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1325 y2 += (x2 * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1333 y1 -= ((im->sx - x1) * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1337 y2 -= ((im->sx - x2) * (y1 - y2)) / (x2 - x1); in gdImageAALine()
1342 dy = y2 - y1; in gdImageAALine()
1352 tmp = y1; in gdImageAALine()
1353 y1 = y2; in gdImageAALine()
1356 dy = y2 - y1; in gdImageAALine()
1359 y = y1 << 16; in gdImageAALine()
1374 tmp = y1; in gdImageAALine()
1375 y1 = y2; in gdImageAALine()
1378 dy = y2 - y1; in gdImageAALine()
1381 y = y1 << 16; in gdImageAALine()
1396 void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageDashedLine() argument
1406 dy = abs(y2 - y1); in gdImageDashedLine()
1430 y = y1; in gdImageDashedLine()
1435 if (((y2 - y1) * ydirflag) > 0) { in gdImageDashedLine()
1472 if (y1 > y2) { in gdImageDashedLine()
1475 yend = y1; in gdImageDashedLine()
1478 y = y1; in gdImageDashedLine()
2030 void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageRectangle() argument
2032 int x1h = x1, x1v = x1, y1h = y1, y1v = y1, x2h = x2, x2v = x2, y2h = y2, y2v = y2; in gdImageRectangle()
2037 if (x1 == x2 && y1 == y2 && thick == 1) { in gdImageRectangle()
2038 gdImageSetPixel(im, x1, y1, color); in gdImageRectangle()
2042 if (y2 < y1) { in gdImageRectangle()
2043 t=y1; in gdImageRectangle()
2044 y1 = y2; in gdImageRectangle()
2052 x1h = x1; x1v = x1; y1h = y1; y1v = y1; x2h = x2; x2v = x2; y2h = y2; y2v = y2; in gdImageRectangle()
2058 y1ul = y1 - half; in gdImageRectangle()
2106 void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color) in gdImageFilledRectangle() argument
2111 if (x1 == x2 && y1 == y2) { in gdImageFilledRectangle()
2112 gdImageSetPixel(im, x1, y1, color); in gdImageFilledRectangle()
2122 if (y1 > y2) { in gdImageFilledRectangle()
2123 y = y1; in gdImageFilledRectangle()
2124 y1 = y2; in gdImageFilledRectangle()
2136 if (y1 < 0) { in gdImageFilledRectangle()
2137 y1 = 0; in gdImageFilledRectangle()
2144 for (y = y1; (y <= y2); y++) { in gdImageFilledRectangle()
2563 typedef void (*image_line)(gdImagePtr im, int x1, int y1, int x2, int y2, int color); in gdImagePolygon()
2613 int x1, y1; in gdImageFilledPolygon() local
2679 y1 = p[ind1].y; in gdImageFilledPolygon()
2681 if (y1 < y2) { in gdImageFilledPolygon()
2684 } else if (y1 > y2) { in gdImageFilledPolygon()
2686 y1 = p[ind2].y; in gdImageFilledPolygon()
2696 if (y >= y1 && y < y2) { in gdImageFilledPolygon()
2697 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
2972 void gdImageSetClip (gdImagePtr im, int x1, int y1, int x2, int y2) in gdImageSetClip() argument
2986 if (y1 < 0) { in gdImageSetClip()
2987 y1 = 0; in gdImageSetClip()
2989 if (y1 >= im->sy) { in gdImageSetClip()
2990 y1 = im->sy - 1; in gdImageSetClip()
2999 im->cy1 = y1; in gdImageSetClip()