Lines Matching refs:y
46 int y; in gdImageCrop() local
65 if (crop->x < 0 || crop->x>=src->sx || crop->y<0 || crop->y>=src->sy) { in gdImageCrop()
73 if ((src->sy - crop->height) < crop->y) { in gdImageCrop()
74 crop->height = src->sy - crop->y; in gdImageCrop()
78 printf("rect->x: %i\nrect->y: %i\nrect->width: %i\nrect->height: %i\n", crop->x, crop->y, crop->wid… in gdImageCrop()
80 y = crop->y; in gdImageCrop()
83 while (y < (crop->y + crop->height)) { in gdImageCrop()
85 memcpy(dst->tpixels[dst_y++], src->tpixels[y++] + crop->x, crop->width * 4); in gdImageCrop()
89 for (y = crop->y; y < (crop->y + crop->height); y++) { in gdImageCrop()
91 dst->pixels[y - crop->y][x - crop->x] = src->pixels[y][x]; in gdImageCrop()
119 int x,y; in gdImageCropAuto() local
124 crop.y = 0; in gdImageCropAuto()
159 for (y = 0; match && y < height; y++) { in gdImageCropAuto()
161 int c2 = gdImageGetPixel(im, x, y); in gdImageCropAuto()
169 if (y == height - 1) { in gdImageCropAuto()
173 crop.y = y -1; in gdImageCropAuto()
175 for (y = height - 1; match && y >= 0; y--) { in gdImageCropAuto()
177 match = (color == gdImageGetPixel(im, x,y)); in gdImageCropAuto()
181 if (y == 0) { in gdImageCropAuto()
182 crop.height = height - crop.y + 1; in gdImageCropAuto()
184 crop.height = y - crop.y + 2; in gdImageCropAuto()
189 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropAuto()
190 match = (color == gdImageGetPixel(im, x,y)); in gdImageCropAuto()
197 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropAuto()
198 match = (color == gdImageGetPixel(im, x,y)); in gdImageCropAuto()
202 if (crop.x <= 0 || crop.y <= 0 || crop.width <= 0 || crop.height <= 0) { in gdImageCropAuto()
232 int x,y; in gdImageCropThreshold() local
237 crop.y = 0; in gdImageCropThreshold()
255 for (y = 0; match && y < height; y++) { in gdImageCropThreshold()
257 match = (gdColorMatch(im, color, gdImageGetPixel(im, x,y), threshold)) > 0; in gdImageCropThreshold()
265 if (y == height - 1) { in gdImageCropThreshold()
269 crop.y = y -1; in gdImageCropThreshold()
271 for (y = height - 1; match && y >= 0; y--) { in gdImageCropThreshold()
273 match = (gdColorMatch(im, color, gdImageGetPixel(im, x, y), threshold)) > 0; in gdImageCropThreshold()
277 if (y == 0) { in gdImageCropThreshold()
278 crop.height = height - crop.y + 1; in gdImageCropThreshold()
280 crop.height = y - crop.y + 2; in gdImageCropThreshold()
285 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropThreshold()
286 match = (gdColorMatch(im, color, gdImageGetPixel(im, x,y), threshold)) > 0; in gdImageCropThreshold()
293 for (y = 0; match && y < crop.y + crop.height - 1; y++) { in gdImageCropThreshold()
294 match = (gdColorMatch(im, color, gdImageGetPixel(im, x,y), threshold)) > 0; in gdImageCropThreshold()