Lines Matching refs:CLAMP
88 #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) macro
792 r = CLAMP(r, 0, 255); in getPixelInterpolateWeight()
793 g = CLAMP(g, 0, 255); in getPixelInterpolateWeight()
794 b = CLAMP(b, 0, 255); in getPixelInterpolateWeight()
795 a = CLAMP(a, 0, gdAlphaMax); in getPixelInterpolateWeight()
881 new_r = CLAMP(new_r, 0, 255); in getPixelInterpolated()
882 new_g = CLAMP(new_g, 0, 255); in getPixelInterpolated()
883 new_b = CLAMP(new_b, 0, 255); in getPixelInterpolated()
884 new_a = CLAMP(new_a, 0, gdAlphaMax); in getPixelInterpolated()
1671 red = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_red, f_gamma)), 0, 255); in gdImageScaleBicubicFixed()
1672 green = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_green, f_gamma)), 0, 255); in gdImageScaleBicubicFixed()
1673 blue = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_blue, f_gamma)), 0, 255); in gdImageScaleBicubicFixed()
1674 alpha = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_alpha, f_gamma)), 0, 127); in gdImageScaleBicubicFixed()
1962 const unsigned char red = (unsigned char) CLAMP(gd_fxtoi(f_red), 0, 255); in gdImageRotateBilinear()
1963 const unsigned char green = (unsigned char) CLAMP(gd_fxtoi(f_green), 0, 255); in gdImageRotateBilinear()
1964 const unsigned char blue = (unsigned char) CLAMP(gd_fxtoi(f_blue), 0, 255); in gdImageRotateBilinear()
1965 const unsigned char alpha = (unsigned char) CLAMP(gd_fxtoi(f_alpha), 0, 127); in gdImageRotateBilinear()
2228 red = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_red, f_gama)), 0, 255); in gdImageRotateBicubicFixed()
2229 green = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_green, f_gama)), 0, 255); in gdImageRotateBicubicFixed()
2230 blue = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_blue, f_gama)), 0, 255); in gdImageRotateBicubicFixed()
2231 alpha = (unsigned char) CLAMP(gd_fxtoi(gd_mulfx(f_alpha, f_gama)), 0, 127); in gdImageRotateBicubicFixed()
2330 r->x = CLAMP(r->x, c1x, c2x); in gdImageClipRectangle()
2331 r->y = CLAMP(r->y, c1y, c2y); in gdImageClipRectangle()
2332 r->width = CLAMP(x1, c1x, c2x) - r->x + 1; in gdImageClipRectangle()
2333 r->height = CLAMP(y1, c1y, c2y) - r->y + 1; in gdImageClipRectangle()