Lines Matching refs:y
94 static void gdImageBrushApply(gdImagePtr im, int x, int y);
95 static void gdImageTileApply(gdImagePtr im, int x, int y);
96 static void gdImageAntiAliasedApply(gdImagePtr im, int x, int y);
99 int gdImageGetTrueColorPixel(gdImagePtr im, int x, int y);
621 int x, y, p; in gdImagePaletteCopy() local
631 for (y = 0; y < to->sy; y++) { in gdImagePaletteCopy()
633 p = gdImageGetPixel(to, x, y); in gdImagePaletteCopy()
638 gdImageSetPixel(to, x, y, xlate[p]); in gdImagePaletteCopy()
727 void gdImageSetPixel (gdImagePtr im, int x, int y, int color) in gdImageSetPixel() argument
739 gdImageSetPixel(im, x, y, p); in gdImageSetPixel()
750 gdImageSetPixel(im, x, y, gdBrushed); in gdImageSetPixel()
755 gdImageBrushApply(im, x, y); in gdImageSetPixel()
758 gdImageTileApply(im, x, y); in gdImageSetPixel()
761 gdImageAntiAliasedApply(im, x, y); in gdImageSetPixel()
764 if (gdImageBoundsSafe(im, x, y)) { in gdImageSetPixel()
769 im->tpixels[y][x] = color; in gdImageSetPixel()
772 im->tpixels[y][x] = gdAlphaBlend(im->tpixels[y][x], color); in gdImageSetPixel()
775 im->tpixels[y][x] = gdAlphaBlend(im->tpixels[y][x], color); in gdImageSetPixel()
778 im->tpixels[y][x] = gdLayerOverlay(im->tpixels[y][x], color); in gdImageSetPixel()
782 im->pixels[y][x] = color; in gdImageSetPixel()
789 int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y) in gdImageGetTrueColorPixel() argument
791 int p = gdImageGetPixel(im, x, y); in gdImageGetTrueColorPixel()
800 static void gdImageBrushApply (gdImagePtr im, int x, int y) in gdImageBrushApply() argument
812 y1 = y - hy; in gdImageBrushApply()
876 static void gdImageTileApply (gdImagePtr im, int x, int y) in gdImageTileApply() argument
885 srcy = y % gdImageSY(tile); in gdImageTileApply()
892 gdImageSetPixel(im, x, y, p); in gdImageTileApply()
900 gdImageSetPixel(im, x, y, gdImageColorResolveAlpha(im, in gdImageTileApply()
906 gdImageSetPixel(im, x, y, im->tileColorMap[p]); in gdImageTileApply()
913 static int gdImageTileGet (gdImagePtr im, int x, int y) in gdImageTileGet() argument
921 srcy = y % gdImageSY(im->tile); in gdImageTileGet()
1004 int gdImageGetPixel (gdImagePtr im, int x, int y) in gdImageGetPixel() argument
1006 if (gdImageBoundsSafe(im, x, y)) { in gdImageGetPixel()
1008 return im->tpixels[y][x]; in gdImageGetPixel()
1010 return im->pixels[y][x]; in gdImageGetPixel()
1063 static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col) in gdImageHLine() argument
1067 _gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col); in gdImageHLine()
1076 gdImageSetPixel(im, x1, y, col); in gdImageHLine()
1104 int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; in gdImageLine() local
1158 y = y2; in gdImageLine()
1163 y = y1; in gdImageLine()
1169 wstart = y - wid / 2; in gdImageLine()
1180 y++; in gdImageLine()
1183 wstart = y - wid / 2; in gdImageLine()
1194 y--; in gdImageLine()
1197 wstart = y - wid / 2; in gdImageLine()
1221 y = y2; in gdImageLine()
1226 y = y1; in gdImageLine()
1235 gdImageSetPixel (im, w, y, color); in gdImageLine()
1239 while (y < yend) { in gdImageLine()
1240 y++; in gdImageLine()
1249 gdImageSetPixel (im, w, y, color); in gdImageLine()
1253 while (y < yend) { in gdImageLine()
1254 y++; in gdImageLine()
1263 gdImageSetPixel (im, w, y, color); in gdImageLine()
1277 inline static void gdImageSetAAPixelColor(gdImagePtr im, int x, int y, int color, int t) in gdImageSetAAPixelColor() argument
1284 p = gdImageGetPixel(im,x,y); in gdImageSetAAPixelColor()
1292 im->tpixels[y][x]=gdTrueColorAlpha(dr, dg, db, gdAlphaOpaque); in gdImageSetAAPixelColor()
1301 long x, y, inc, frac; in gdImageAALine() local
1326 y = y1; in gdImageAALine()
1330 gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF); in gdImageAALine()
1331 if (y + 1 < im->sy) { in gdImageAALine()
1332 gdImageSetAAPixelColor(im, x, y + 1, col, (~frac >> 8) & 0xFF); in gdImageAALine()
1337 y++; in gdImageAALine()
1340 y--; in gdImageAALine()
1357 for (y = y1; y <= y2; y++) { in gdImageAALine()
1358 gdImageSetAAPixelColor(im, x, y, col, (frac >> 8) & 0xFF); in gdImageAALine()
1360 gdImageSetAAPixelColor(im, x + 1, y, col, (~frac >> 8) & 0xFF); in gdImageAALine()
1374 static void dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, i…
1378 int dx, dy, incr1, incr2, d, x, y, xend, yend, xdirflag, ydirflag; in gdImageDashedLine() local
1405 y = y2; in gdImageDashedLine()
1410 y = y1; in gdImageDashedLine()
1414 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1421 y++; in gdImageDashedLine()
1424 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1432 y--; in gdImageDashedLine()
1435 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1453 y = y2; in gdImageDashedLine()
1458 y = y1; in gdImageDashedLine()
1463 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1465 while (y < yend) { in gdImageDashedLine()
1466 y++; in gdImageDashedLine()
1473 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1476 while (y < yend) { in gdImageDashedLine()
1477 y++; in gdImageDashedLine()
1484 dashedSet(im, x, y, color, &on, &dashStep, wid, vert); in gdImageDashedLine()
1490 static void dashedSet (gdImagePtr im, int x, int y, int color, int *onP, int *dashStepP, int wid, i… in dashedSet() argument
1503 wstart = y - wid / 2; in dashedSet()
1510 gdImageSetPixel(im, w, y, color); in dashedSet()
1518 void gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color) in gdImageChar() argument
1532 for (py = y; (py < (y + f->h)); py++) { in gdImageChar()
1544 void gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c, int color) in gdImageCharUp() argument
1558 for (py = y; py > (y - f->w); py--) { in gdImageCharUp()
1570 void gdImageString (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color) in gdImageString() argument
1576 gdImageChar(im, f, x, y, s[i], color); in gdImageString()
1581 void gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color) in gdImageStringUp() argument
1587 gdImageCharUp(im, f, x, y, s[i], color); in gdImageStringUp()
1588 y -= f->w; in gdImageStringUp()
1594 void gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color) in gdImageString16() argument
1600 gdImageChar(im, f, x, y, s[i], color); in gdImageString16()
1605 void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color) in gdImageStringUp16() argument
1611 gdImageCharUp(im, f, x, y, s[i], color); in gdImageStringUp16()
1612 y -= f->w; in gdImageStringUp16()
1679 int x, y; in gdImageFilledArc() local
1681 y = ((long) gdSinT[i % 360] * (long) h / (2 * 1024)) + cy; in gdImageFilledArc()
1685 gdImageLine(im, lx, ly, x, y, color); in gdImageFilledArc()
1687 if (y == ly) { in gdImageFilledArc()
1696 pts[pti].y = y; in gdImageFilledArc()
1702 fy = y; in gdImageFilledArc()
1705 pts[0].y = cy; in gdImageFilledArc()
1707 pts[pti].y = y; in gdImageFilledArc()
1711 ly = y; in gdImageFilledArc()
1722 pts[0].y = fy; in gdImageFilledArc()
1724 pts[1].y = ly; in gdImageFilledArc()
1726 pts[2].y = cy; in gdImageFilledArc()
1737 pts[pti].y = cy; in gdImageFilledArc()
1743 void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color) in gdImageFillToBorder() argument
1769 if (y >= im->sy) { in gdImageFillToBorder()
1770 y = im->sy - 1; in gdImageFillToBorder()
1771 } else if (y < 0) { in gdImageFillToBorder()
1772 y = 0; in gdImageFillToBorder()
1776 if (gdImageGetPixel(im, i, y) == border) { in gdImageFillToBorder()
1779 gdImageSetPixel(im, i, y, color); in gdImageFillToBorder()
1789 if (gdImageGetPixel(im, i, y) == border) { in gdImageFillToBorder()
1792 gdImageSetPixel(im, i, y, color); in gdImageFillToBorder()
1797 if (y > 0) { in gdImageFillToBorder()
1800 int c = gdImageGetPixel(im, i, y - 1); in gdImageFillToBorder()
1803 gdImageFillToBorder(im, i, y - 1, border, color); in gdImageFillToBorder()
1813 if (y < ((im->sy) - 1)) { in gdImageFillToBorder()
1816 int c = gdImageGetPixel(im, i, y + 1); in gdImageFillToBorder()
1820 gdImageFillToBorder(im, i, y + 1, border, color); in gdImageFillToBorder()
1842 struct seg {int y, xl, xr, dy;}; member
1848 {sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;}
1851 {sp--; Y = sp->y+(DY = sp->dy); XL = sp->xl; XR = sp->xr;}
1853 static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc);
1855 void gdImageFill(gdImagePtr im, int x, int y, int nc) in gdImageFill() argument
1876 _gdImageFillTiled(im,x,y,nc); in gdImageFill()
1882 oc = gdImageGetPixel(im, x, y); in gdImageFill()
1883 if (oc==nc || x<0 || x>wx2 || y<0 || y>wy2) { in gdImageFill()
1892 int ix = x, iy = y, c; in gdImageFill()
1910 FILL_PUSH(y,x,x,1); in gdImageFill()
1912 FILL_PUSH(y+1, x, x, -1); in gdImageFill()
1914 FILL_POP(y, x1, x2, dy); in gdImageFill()
1916 for (x=x1; x>=0 && gdImageGetPixel(im,x, y)==oc; x--) { in gdImageFill()
1917 gdImageSetPixel(im,x, y, nc); in gdImageFill()
1926 FILL_PUSH(y, l, x1-1, -dy); in gdImageFill()
1930 for (; x<=wx2 && gdImageGetPixel(im,x, y)==oc; x++) { in gdImageFill()
1931 gdImageSetPixel(im, x, y, nc); in gdImageFill()
1933 FILL_PUSH(y, l, x-1, dy); in gdImageFill()
1936 FILL_PUSH(y, x2+1, x-1, -dy); in gdImageFill()
1938 skip: for (x++; x<=x2 && (gdImageGetPixel(im, x, y)!=oc); x++); in gdImageFill()
1950 static void _gdImageFillTiled(gdImagePtr im, int x, int y, int nc) in _gdImageFillTiled() argument
1966 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
1976 oc = gdImageGetPixel(im, x, y); in _gdImageFillTiled()
1979 FILL_PUSH(y,x,x,1); in _gdImageFillTiled()
1981 FILL_PUSH(y+1, x, x, -1); in _gdImageFillTiled()
1983 FILL_POP(y, x1, x2, dy); in _gdImageFillTiled()
1984 for (x=x1; x>=0 && (!pts[y][x] && gdImageGetPixel(im,x,y)==oc); x--) { in _gdImageFillTiled()
1985 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
1986 pts[y][x] = 1; in _gdImageFillTiled()
1987 gdImageSetPixel(im,x, y, nc); in _gdImageFillTiled()
1996 FILL_PUSH(y, l, x1-1, -dy); in _gdImageFillTiled()
2000 for(; x<wx2 && (!pts[y][x] && gdImageGetPixel(im,x, y)==oc); x++) { in _gdImageFillTiled()
2001 nc = gdImageTileGet(im,x,y); in _gdImageFillTiled()
2002 pts[y][x] = 1; in _gdImageFillTiled()
2003 gdImageSetPixel(im, x, y, nc); in _gdImageFillTiled()
2005 FILL_PUSH(y, l, x-1, dy); in _gdImageFillTiled()
2008 FILL_PUSH(y, x2+1, x-1, -dy); in _gdImageFillTiled()
2010 skip: for(x++; x<=x2 && (pts[y][x] || gdImageGetPixel(im,x, y)!=oc); x++); in _gdImageFillTiled()
2108 int x, y; in _gdImageFilledHRectangle() local
2122 y = y1; in _gdImageFilledHRectangle()
2124 y2 = y; in _gdImageFilledHRectangle()
2144 for (y = y1; (y <= y2); y++) { in _gdImageFilledHRectangle()
2145 gdImageSetPixel (im, x, y, color); in _gdImageFilledHRectangle()
2152 int x, y; in _gdImageFilledVRectangle() local
2166 y = y1; in _gdImageFilledVRectangle()
2168 y2 = y; in _gdImageFilledVRectangle()
2187 for (y = y1; (y <= y2); y++) { in _gdImageFilledVRectangle()
2189 gdImageSetPixel (im, x, y, color); in _gdImageFilledVRectangle()
2202 int x, y; in gdImageCopy() local
2214 for (y = 0; (y < h); y++) { in gdImageCopy()
2216 int c = gdImageGetTrueColorPixel (src, srcX + x, srcY + y); in gdImageCopy()
2218 gdImageSetPixel (dst, dstX + x, dstY + y, c); in gdImageCopy()
2224 for (y = 0; (y < h); y++) { in gdImageCopy()
2226 int c = gdImageGetPixel (src, srcX + x, srcY + y); in gdImageCopy()
2228 …gdImageSetPixel(dst, dstX + x, dstY + y, gdTrueColorAlpha(src->red[c], src->green[c], src->blue[c]… in gdImageCopy()
2241 for (y = srcY; y < (srcY + h); y++) { in gdImageCopy()
2246 c = gdImageGetPixel (src, x, y); in gdImageCopy()
2283 int x, y; in gdImageCopyMerge() local
2288 for (y = srcY; y < (srcY + h); y++) { in gdImageCopyMerge()
2292 c = gdImageGetPixel(src, x, y); in gdImageCopyMerge()
2323 int x, y; in gdImageCopyMergeGray() local
2329 for (y = srcY; (y < (srcY + h)); y++) { in gdImageCopyMergeGray()
2333 c = gdImageGetPixel (src, x, y); in gdImageCopyMergeGray()
2377 int x, y; in gdImageCopyResized() local
2406 for (y = srcY; (y < (srcY + srcH)); y++) { in gdImageCopyResized()
2407 for (ydest = 0; (ydest < sty[y - srcY]); ydest++) { in gdImageCopyResized()
2418 int tmp = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2419 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2427 mapTo = gdImageGetTrueColorPixel (src, x, y); in gdImageCopyResized()
2436 c = gdImageGetPixel (src, x, y); in gdImageCopyResized()
2486 int x, y; in gdImageCopyResampled() local
2493 for (y = dstY; (y < dstY + dstH); y++) { in gdImageCopyResampled()
2494 sy1 = ((double) y - (double) dstY) * (double) srcH / (double) dstH; in gdImageCopyResampled()
2495 sy2 = ((double) (y + 1) - (double) dstY) * (double) srcH / (double) dstH; in gdImageCopyResampled()
2581 gdImageSetPixel(dst, x, y, gdTrueColorAlpha ((int) red, (int) green, (int) blue, (int) alpha)); in gdImageCopyResampled()
2610 ly = p->y; in gdImagePolygon()
2611 draw_line(im, lx, ly, p[n - 1].x, p[n - 1].y, c); in gdImagePolygon()
2614 draw_line(im, lx, ly, p->x, p->y, c); in gdImagePolygon()
2616 ly = p->y; in gdImagePolygon()
2638 int y; in gdImageFilledPolygon() local
2673 miny = p[0].y; in gdImageFilledPolygon()
2674 maxy = p[0].y; in gdImageFilledPolygon()
2676 if (p[i].y < miny) { in gdImageFilledPolygon()
2677 miny = p[i].y; in gdImageFilledPolygon()
2679 if (p[i].y > maxy) { in gdImageFilledPolygon()
2680 maxy = p[i].y; in gdImageFilledPolygon()
2706 for (y = miny; y <= maxy; y++) { in gdImageFilledPolygon()
2719 y1 = p[ind1].y; in gdImageFilledPolygon()
2720 y2 = p[ind2].y; in gdImageFilledPolygon()
2725 y2 = p[ind1].y; in gdImageFilledPolygon()
2726 y1 = p[ind2].y; in gdImageFilledPolygon()
2736 if (y >= y1 && y < y2) { in gdImageFilledPolygon()
2737 im->polyInts[ints++] = (float) ((y - y1) * (x2 - x1)) / (float) (y2 - y1) + 0.5 + x1; in gdImageFilledPolygon()
2738 } else if (y == pmaxy && y == y2) { in gdImageFilledPolygon()
2745 gdImageLine(im, im->polyInts[i], y, im->polyInts[i + 1], y, fill_color); in gdImageFilledPolygon()
2824 int x, y; in gdImageCompare() local
2861 for (y = 0; y < sy; y++) { in gdImageCompare()
2863 p1 = im1->trueColor ? gdImageTrueColorPixel(im1, x, y) : gdImagePalettePixel(im1, x, y); in gdImageCompare()
2864 p2 = im2->trueColor ? gdImageTrueColorPixel(im2, x, y) : gdImagePalettePixel(im2, x, y); in gdImageCompare()
3055 unsigned int y; in gdImagePaletteToTrueColor() local
3074 for (y = 0; y < sy; y++) { in gdImagePaletteToTrueColor()
3075 const unsigned char *src_row = src->pixels[y]; in gdImagePaletteToTrueColor()
3079 src->tpixels[y] = (int *) gdMalloc(sx * sizeof(int)); in gdImagePaletteToTrueColor()
3080 if (src->tpixels[y] == NULL) { in gdImagePaletteToTrueColor()
3084 dst_row = src->tpixels[y]; in gdImagePaletteToTrueColor()
3097 for (yy = 0; yy < y; yy++) { in gdImagePaletteToTrueColor()
3114 if (y > 0) { in gdImagePaletteToTrueColor()
3116 for (yy = y; yy >= yy - 1; y--) { in gdImagePaletteToTrueColor()
3117 gdFree(src->tpixels[y]); in gdImagePaletteToTrueColor()