Lines Matching refs:fract
124 static l_int32 blendComponents(l_int32 a, l_int32 b, l_float32 fract);
125 static l_int32 blendHardLightComponents(l_int32 a, l_int32 b, l_float32 fract);
150 l_float32 fract) in pixBlend() argument
193 pixd = pixBlendMask(NULL, pixs1, pixc, x, y, fract, in pixBlend()
196 pixd = pixBlendGray(NULL, pixs1, pixc, x, y, fract, in pixBlend()
199 pixd = pixBlendColor(NULL, pixs1, pixc, x, y, fract, 0, 0); in pixBlend()
235 l_float32 fract, in pixBlendMask() argument
258 if (fract < 0.0 || fract > 1.0) { in pixBlendMask()
260 fract = 0.5; in pixBlendMask()
315 val = (l_int32)(pixval + fract * (255 - 2 * pixval)); in pixBlendMask()
321 rval = (l_int32)(rval + fract * (255 - 2 * rval)); in pixBlendMask()
322 gval = (l_int32)(gval + fract * (255 - 2 * gval)); in pixBlendMask()
323 bval = (l_int32)(bval + fract * (255 - 2 * bval)); in pixBlendMask()
346 val = (l_int32)(pixval + fract * (255 - pixval)); in pixBlendMask()
352 rval = (l_int32)(rval + fract * (255 - rval)); in pixBlendMask()
353 gval = (l_int32)(gval + fract * (255 - gval)); in pixBlendMask()
354 bval = (l_int32)(bval + fract * (255 - bval)); in pixBlendMask()
377 val = (l_int32)((1. - fract) * pixval); in pixBlendMask()
383 rval = (l_int32)((1. - fract) * rval); in pixBlendMask()
384 gval = (l_int32)((1. - fract) * gval); in pixBlendMask()
385 bval = (l_int32)((1. - fract) * bval); in pixBlendMask()
451 l_float32 fract, in pixBlendGray() argument
478 if (fract < 0.0 || fract > 1.0) { in pixBlendGray()
480 fract = 0.5; in pixBlendGray()
526 ival = (l_int32)((1. - fract) * dval + fract * cval); in pixBlendGray()
539 irval = (l_int32)((1. - fract) * irval + fract * cval); in pixBlendGray()
540 igval = (l_int32)((1. - fract) * igval + fract * cval); in pixBlendGray()
541 ibval = (l_int32)((1. - fract) * ibval + fract * cval); in pixBlendGray()
577 ival += (l_int32)(fract * delta + 0.5); in pixBlendGray()
592 irval += (l_int32)(fract * delta + 0.5); in pixBlendGray()
594 igval += (l_int32)(fract * delta + 0.5); in pixBlendGray()
596 ibval += (l_int32)(fract * delta + 0.5); in pixBlendGray()
647 l_float32 fract, in pixBlendColor() argument
671 if (fract < 0.0 || fract > 1.0) { in pixBlendColor()
673 fract = 0.5; in pixBlendColor()
714 rval = (l_int32)((1. - fract) * rval + fract * rcval); in pixBlendColor()
715 gval = (l_int32)((1. - fract) * gval + fract * gcval); in pixBlendColor()
716 bval = (l_int32)((1. - fract) * bval + fract * bcval); in pixBlendColor()
837 l_float32 fract) in blendComponents() argument
839 if (fract < 0.) in blendComponents()
841 if (fract > 1.) in blendComponents()
843 return (l_int32)((1. - fract) * a + fract * b); in blendComponents()
897 l_float32 fract, in pixBlendGrayAdapt() argument
924 if (fract < 0.0 || fract > 1.0) { in pixBlendGrayAdapt()
926 fract = 0.5; in pixBlendGrayAdapt()
1006 dval += (l_int32)(fract * delta + 0.5); in pixBlendGrayAdapt()
1033 factor = fract * delta / mval; in pixBlendGrayAdapt()
1076 l_float32 nfactor, fract; in pixFadeWithGray() local
1116 fract = nfactor * (l_float32)valb; in pixFadeWithGray()
1117 fract = L_MIN(fract, 1.0); in pixFadeWithGray()
1121 nvald = vald + (l_int32)(fract * (255. - (l_float32)vald)); in pixFadeWithGray()
1123 nvald = vald - (l_int32)(fract * (l_float32)vald); in pixFadeWithGray()
1130 nrval = rval + (l_int32)(fract * (255. - (l_float32)rval)); in pixFadeWithGray()
1131 ngval = gval + (l_int32)(fract * (255. - (l_float32)gval)); in pixFadeWithGray()
1132 nbval = bval + (l_int32)(fract * (255. - (l_float32)bval)); in pixFadeWithGray()
1135 nrval = rval - (l_int32)(fract * (l_float32)rval); in pixFadeWithGray()
1136 ngval = gval - (l_int32)(fract * (l_float32)gval); in pixFadeWithGray()
1137 nbval = bval - (l_int32)(fract * (l_float32)bval); in pixFadeWithGray()
1186 l_float32 fract) in pixBlendHardLight() argument
1213 if (fract < 0.0 || fract > 1.0) { in pixBlendHardLight()
1215 fract = 0.5; in pixBlendHardLight()
1271 dval = blendHardLightComponents(dval, cval, fract); in pixBlendHardLight()
1277 rdval = blendHardLightComponents(rdval, cval, fract); in pixBlendHardLight()
1278 gdval = blendHardLightComponents(gdval, cval, fract); in pixBlendHardLight()
1279 bdval = blendHardLightComponents(bdval, cval, fract); in pixBlendHardLight()
1287 rdval = blendHardLightComponents(rdval, rcval, fract); in pixBlendHardLight()
1288 gdval = blendHardLightComponents(gdval, gcval, fract); in pixBlendHardLight()
1289 bdval = blendHardLightComponents(bdval, bcval, fract); in pixBlendHardLight()
1310 l_float32 fract) in blendHardLightComponents() argument
1313 b = 0x80 - (l_int32)(fract * (0x80 - b)); in blendHardLightComponents()
1316 b = 0x80 + (l_int32)(fract * (b - 0x80)); in blendHardLightComponents()