Lines Matching refs:x

16 extern float fabsf(float x);
18 extern float floorf(float x);
31 # define fabsf(x) ((float)(fabs(x))) argument
37 # define floorf(x) ((float)(floor(x))) argument
166 static void gdImageBrushApply(gdImagePtr im, int x, int y);
167 static void gdImageTileApply(gdImagePtr im, int x, int y);
169 int gdImageGetTrueColorPixel(gdImagePtr im, int x, int y);
657 int x, y, p; in gdImagePaletteCopy() local
668 for (x = 0; x < to->sx; x++) { in gdImagePaletteCopy()
669 p = gdImageGetPixel(to, x, y); in gdImagePaletteCopy()
674 gdImageSetPixel(to, x, y, xlate[p]); in gdImagePaletteCopy()
763 void gdImageSetPixel (gdImagePtr im, int x, int y, int color) in gdImageSetPixel() argument
775 gdImageSetPixel(im, x, y, p); in gdImageSetPixel()
786 gdImageSetPixel(im, x, y, gdBrushed); in gdImageSetPixel()
791 gdImageBrushApply(im, x, y); in gdImageSetPixel()
794 gdImageTileApply(im, x, y); in gdImageSetPixel()
799 gdImageSetPixel(im, x, y, im->AA_color); in gdImageSetPixel()
802 if (gdImageBoundsSafe(im, x, y)) { in gdImageSetPixel()
807 im->tpixels[y][x] = color; in gdImageSetPixel()
811 im->tpixels[y][x] = gdAlphaBlend(im->tpixels[y][x], color); in gdImageSetPixel()
814 im->tpixels[y][x] = gdLayerOverlay(im->tpixels[y][x], color); in gdImageSetPixel()
817 im->tpixels[y][x] = gdLayerMultiply(im->tpixels[y][x], color); in gdImageSetPixel()
821 im->pixels[y][x] = color; in gdImageSetPixel()
828 int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y) in gdImageGetTrueColorPixel() argument
830 int p = gdImageGetPixel(im, x, y); in gdImageGetTrueColorPixel()
839 static void gdImageBrushApply (gdImagePtr im, int x, int y) in gdImageBrushApply() argument
854 x1 = x - hx; in gdImageBrushApply()
915 static void gdImageTileApply (gdImagePtr im, int x, int y) in gdImageTileApply() argument
923 srcx = x % gdImageSX(tile); in gdImageTileApply()
931 gdImageSetPixel(im, x, y, p); in gdImageTileApply()
939 gdImageSetPixel(im, x, y, gdImageColorResolveAlpha(im, in gdImageTileApply()
945 gdImageSetPixel(im, x, y, im->tileColorMap[p]); in gdImageTileApply()
952 static int gdImageTileGet (gdImagePtr im, int x, int y) in gdImageTileGet() argument
959 srcx = x % gdImageSX(im->tile); in gdImageTileGet()
981 int gdImageGetPixel (gdImagePtr im, int x, int y) in gdImageGetPixel() argument
983 if (gdImageBoundsSafe(im, x, y)) { in gdImageGetPixel()
985 return im->tpixels[y][x]; in gdImageGetPixel()
987 return im->pixels[y][x]; in gdImageGetPixel()
1020 static void gdImageVLine(gdImagePtr im, int x, int y1, int y2, int col) in gdImageVLine() argument
1024 gdImageFilledRectangle(im, x - thickhalf, y1, x + im->thick - thickhalf - 1, y2, col); in gdImageVLine()
1033 gdImageSetPixel(im, x, y1, col); in gdImageVLine()
1042 int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; in gdImageLine() local
1095 x = x2; in gdImageLine()
1100 x = x1; in gdImageLine()
1109 gdImageSetPixel(im, x, w, color); in gdImageLine()
1113 while (x < xend) { in gdImageLine()
1114 x++; in gdImageLine()
1123 gdImageSetPixel (im, x, w, color); in gdImageLine()
1127 while (x < xend) { in gdImageLine()
1128 x++; in gdImageLine()
1137 gdImageSetPixel (im, x, w, color); in gdImageLine()
1160 x = x2; in gdImageLine()
1165 x = x1; in gdImageLine()
1171 wstart = x - wid / 2; in gdImageLine()
1182 x++; in gdImageLine()
1185 wstart = x - wid / 2; in gdImageLine()
1196 x--; in gdImageLine()
1199 wstart = x - wid / 2; in gdImageLine()
1215 inline static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int t) in gdImageSetAAPixelColor() argument
1222 p = gdImageGetPixel(im,x,y); in gdImageSetAAPixelColor()
1230 im->tpixels[y][x]=gdTrueColorAlpha(dr, dg, db, gdAlphaOpaque); in gdImageSetAAPixelColor()
1239 long x, y, inc, frac; in gdImageAALine() local
1273 for (x = x1; x <= x2; x++) { in gdImageAALine()
1274 gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF); in gdImageAALine()
1276 gdImageSetAAPixelColor(im, x, y + 1, col, (~frac >> 8) & 0xFF); in gdImageAALine()
1298 x = x1; in gdImageAALine()
1302 gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF); in gdImageAALine()
1303 if (x + 1 < im->sx) { in gdImageAALine()
1304 gdImageSetAAPixelColor(im, x + 1, y, col, (~frac >> 8) & 0xFF); in gdImageAALine()
1309 x++; in gdImageAALine()
1312 x--; in gdImageAALine()
1318 static void dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, i…
1322 int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; in gdImageDashedLine() local
1347 x = x2; in gdImageDashedLine()
1352 x = x1; in gdImageDashedLine()
1357 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1359 while (x < xend) { in gdImageDashedLine()
1360 x++; in gdImageDashedLine()
1367 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1370 while (x < xend) { in gdImageDashedLine()
1371 x++; in gdImageDashedLine()
1378 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1397 x = x2; in gdImageDashedLine()
1402 x = x1; in gdImageDashedLine()
1406 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1413 x++; in gdImageDashedLine()
1416 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1424 x--; in gdImageDashedLine()
1427 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1433 static void dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, i… in dashedSet() argument
1448 gdImageSetPixel(im, x, w, color); in dashedSet()
1451 wstart = x - wid / 2; in dashedSet()
1461 void gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color) in gdImageChar() argument
1466 const int xuppper = (x > INT_MAX - f->w) ? INT_MAX : x + f->w; in gdImageChar()
1478 for (px = x; px < xuppper; px++) { in gdImageChar()
1489 void gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color) in gdImageCharUp() argument
1494 const int xuppper = (x > INT_MAX - f->h) ? INT_MAX : x + f->h; in gdImageCharUp()
1506 for (px = x; px < xuppper; px++) { in gdImageCharUp()
1517 void gdImageString (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color) in gdImageString() argument
1523 gdImageChar(im, f, x, y, s[i], color); in gdImageString()
1524 x += f->w; in gdImageString()
1528 void gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color) in gdImageStringUp() argument
1534 gdImageCharUp(im, f, x, y, s[i], color); in gdImageStringUp()
1541 void gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color) in gdImageString16() argument
1547 gdImageChar(im, f, x, y, s[i], color); in gdImageString16()
1548 x += f->w; in gdImageString16()
1552 void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color) in gdImageStringUp16() argument
1558 gdImageCharUp(im, f, x, y, s[i], color); in gdImageStringUp16()
1626 int x, y; in gdImageFilledArc() local
1627 x = endx = ((long) gdCosT[i % 360] * (long) w / (2 * 1024)) + cx; in gdImageFilledArc()
1632 gdImageLine(im, lx, ly, x, y, color); in gdImageFilledArc()
1636 if (((i > 270 || i < 90) && x > lx) || ((i > 90 && i < 270) && x < lx)) { in gdImageFilledArc()
1639 pts[pti].x = x; in gdImageFilledArc()
1642 pts[pti].x = x; in gdImageFilledArc()
1648 fx = x; in gdImageFilledArc()
1651 pts[0].x = cx; in gdImageFilledArc()
1653 pts[pti].x = startx = x; in gdImageFilledArc()
1657 lx = x; in gdImageFilledArc()
1668 pts[0].x = fx; in gdImageFilledArc()
1670 pts[1].x = lx; in gdImageFilledArc()
1672 pts[2].x = cx; in gdImageFilledArc()
1684 if (pts[1].x != startx && pts[1].y == starty) { in gdImageFilledArc()
1687 pts[i].x = pts[i-1].x; in gdImageFilledArc()
1690 pts[1].x = startx; in gdImageFilledArc()
1694 if (pts[pti-1].x != endx && pts[pti-1].y == endy) { in gdImageFilledArc()
1696 pts[pti].x = endx; in gdImageFilledArc()
1701 pts[pti].x = cx; in gdImageFilledArc()
1717 int x=0,mx1=0,mx2=0,my1=0,my2=0; in gdImageEllipse() local
1734 x = a; in gdImageEllipse()
1735 while (x > 0){ in gdImageEllipse()
1742 x--; in gdImageEllipse()
1756 int x=0,mx1=0,mx2=0,my1=0,my2=0; in gdImageFilledEllipse() local
1764 for (x = mx-a; x <= mx+a; x++) { in gdImageFilledEllipse()
1765 gdImageSetPixel(im, x, my, c); in gdImageFilledEllipse()
1778 x = a; in gdImageFilledEllipse()
1780 while (x > 0){ in gdImageFilledEllipse()
1787 x--; in gdImageFilledEllipse()
1802 void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color) in gdImageFillToBorder() argument
1823 if (x >= im->sx) { in gdImageFillToBorder()
1824 x = im->sx - 1; in gdImageFillToBorder()
1825 } else if (x < 0) { in gdImageFillToBorder()
1826 x = 0; in gdImageFillToBorder()
1834 for (i = x; i >= 0; i--) { in gdImageFillToBorder()
1846 rightLimit = x; in gdImageFillToBorder()
1847 for (i = (x + 1); i < im->sx; i++) { in gdImageFillToBorder()
1912 static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc);
1914 void gdImageFill(gdImagePtr im, int x, int y, int nc) in gdImageFill() argument
1935 _gdImageFillTiled(im,x,y,nc); in gdImageFill()
1941 oc = gdImageGetPixel(im, x, y); in gdImageFill()
1942 if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) { in gdImageFill()
1951 int ix = x, iy = y, c; in gdImageFill()
1960 ix = x; in gdImageFill()
1969 FILL_PUSH(y,x,x,1); in gdImageFill()
1971 FILL_PUSH(y+1, x, x, -1); in gdImageFill()
1975 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
1976 gdImageSetPixel(im,x, y, nc); in gdImageFill()
1978 if (x>=x1) { in gdImageFill()
1981 l = x+1; in gdImageFill()
1987 x = x1+1; in gdImageFill()
1989 for (; x<=wx2 && gdImageGetPixel(im,x, y)==oc; x++) { in gdImageFill()
1990 gdImageSetPixel(im, x, y, nc); in gdImageFill()
1992 FILL_PUSH(y, l, x-1, dy); in gdImageFill()
1994 if (x>x2+1) { in gdImageFill()
1995 FILL_PUSH(y, x2+1, x-1, -dy); in gdImageFill()
1998 for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); in gdImageFill()
2000 l = x; in gdImageFill()
2001 } while (x<=x2); in gdImageFill()
2010 static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) in _gdImageFillTiled() argument
2026 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
2036 oc = gdImageGetPixel(im, x, y); in _gdImageFillTiled()
2039 FILL_PUSH(y,x,x,1); in _gdImageFillTiled()
2041 FILL_PUSH(y+1, x, x, -1); in _gdImageFillTiled()
2044 for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
2045 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
2046 pts[y][x] = 1; in _gdImageFillTiled()
2047 gdImageSetPixel(im,x, y, nc); in _gdImageFillTiled()
2049 if (x>=x1) { in _gdImageFillTiled()
2052 l = x+1; in _gdImageFillTiled()
2058 x = x1+1; in _gdImageFillTiled()
2060 for(; x<wx2 && (!pts[y][x] && gdImageGetPixel(im,x, y)==oc); x++) { in _gdImageFillTiled()
2061 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
2062 pts[y][x] = 1; in _gdImageFillTiled()
2063 gdImageSetPixel(im, x, y, nc); in _gdImageFillTiled()
2065 FILL_PUSH(y, l, x-1, dy); in _gdImageFillTiled()
2067 if (x>x2+1) { in _gdImageFillTiled()
2068 FILL_PUSH(y, x2+1, x-1, -dy); in _gdImageFillTiled()
2071 for(x++; x<=x2 && (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); in _gdImageFillTiled()
2072 l = x; in _gdImageFillTiled()
2073 } while (x<=x2); in _gdImageFillTiled()
2165 int x, y; in _gdImageFilledHRectangle() local
2173 x = x1; in _gdImageFilledHRectangle()
2175 x2 = x; in _gdImageFilledHRectangle()
2200 for (x = x1; (x <= x2); x++) { in _gdImageFilledHRectangle()
2202 gdImageSetPixel (im, x, y, color); in _gdImageFilledHRectangle()
2209 int x, y; in _gdImageFilledVRectangle() local
2217 x = x1; in _gdImageFilledVRectangle()
2219 x2 = x; in _gdImageFilledVRectangle()
2245 for (x = x1; (x <= x2); x++) { in _gdImageFilledVRectangle()
2246 gdImageSetPixel (im, x, y, color); in _gdImageFilledVRectangle()
2259 int x, y; in gdImageCopy() local
2272 for (x = 0; (x < w); x++) { in gdImageCopy()
2273 int c = gdImageGetTrueColorPixel (src, srcX + x, srcY + y); in gdImageCopy()
2275 gdImageSetPixel (dst, dstX + x, dstY + y, c); in gdImageCopy()
2282 for (x = 0; (x < w); x++) { in gdImageCopy()
2283 int c = gdImageGetPixel (src, srcX + x, srcY + y); in gdImageCopy()
2285 …gdImageSetPixel(dst, dstX + x, dstY + y, gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c]… in gdImageCopy()
2300 for (x = srcX; x < (srcX + w); x++) { in gdImageCopy()
2303 c = gdImageGetPixel (src, x, y); in gdImageCopy()
2340 int x, y; in gdImageCopyMerge() local
2347 for (x = srcX; x < (srcX + w); x++) { in gdImageCopyMerge()
2349 c = gdImageGetPixel(src, x, y); in gdImageCopyMerge()
2380 int x, y; in gdImageCopyMergeGray() local
2388 for (x = srcX; (x < (srcX + w)); x++) { in gdImageCopyMergeGray()
2390 c = gdImageGetPixel (src, x, y); in gdImageCopyMergeGray()
2434 int x, y; in gdImageCopyResized() local
2466 for (x = srcX; (x < (srcX + srcW)); x++) { in gdImageCopyResized()
2469 if (!stx[x - srcX]) { in gdImageCopyResized()
2475 int tmp = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2476 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2479 tox += stx[x - srcX]; in gdImageCopyResized()
2484 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2488 tox += stx[x - srcX]; in gdImageCopyResized()
2493 c = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2496 tox += stx[x - srcX]; in gdImageCopyResized()
2524 for (i = 0; (i < stx[x - srcX]); i++) { in gdImageCopyResized()
2543 int x, y; in gdImageCopyResampled() local
2553 for (x = dstX; (x < dstX + dstW); x++) { in gdImageCopyResampled()
2558 sx1 = ((double) x - (double) dstX) * (double) srcW / dstW; in gdImageCopyResampled()
2559 sx2 = ((double) (x + 1) - (double) dstX) * (double) srcW / dstW; in gdImageCopyResampled()
2629 gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int)red, (int)green, (int)blue, (int)alpha)); in gdImageCopyResampled()
2641 gdImageLine (im, p->x, p->y, p[n - 1].x, p[n - 1].y, c); in gdImagePolygon()
2654 lx = p->x; in gdImageOpenPolygon()
2658 gdImageLine(im, lx, ly, p->x, p->y, c); in gdImageOpenPolygon()
2659 lx = p->x; in gdImageOpenPolygon()
2724 x1 = x2 = p[0].x; in gdImageFilledPolygon()
2726 if (p[i].x < x1) { in gdImageFilledPolygon()
2727 x1 = p[i].x; in gdImageFilledPolygon()
2728 } else if (p[i].x > x2) { in gdImageFilledPolygon()
2729 x2 = p[i].x; in gdImageFilledPolygon()
2761 x1 = p[ind1].x; in gdImageFilledPolygon()
2762 x2 = p[ind2].x; in gdImageFilledPolygon()
2766 x2 = p[ind1].x; in gdImageFilledPolygon()
2767 x1 = p[ind2].x; in gdImageFilledPolygon()
2866 int x, y; in gdImageCompare() local
2904 for (x = 0; x < sx; x++) { in gdImageCompare()
2905 p1 = im1->trueColor ? gdImageTrueColorPixel(im1, x, y) : gdImagePalettePixel(im1, x, y); in gdImageCompare()
2906 p2 = im2->trueColor ? gdImageTrueColorPixel(im2, x, y) : gdImagePalettePixel(im2, x, y); in gdImageCompare()
3105 unsigned int x; in gdImagePaletteToTrueColor() local
3125 for (x = 0; x < sx; x++) { in gdImagePaletteToTrueColor()
3126 const unsigned char c = *(src_row + x); in gdImagePaletteToTrueColor()
3128 *(dst_row + x) = gdTrueColorAlpha(0, 0, 0, 127); in gdImagePaletteToTrueColor()
3130 *(dst_row + x) = gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c], src->alpha[c]); in gdImagePaletteToTrueColor()