Lines Matching refs:dist
318 long dist; in gdImageColorClosestAlpha() local
327 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorClosestAlpha()
328 if (first || (dist < mindist)) { in gdImageColorClosestAlpha()
329 mindist = dist; in gdImageColorClosestAlpha()
483 float dist; in gdImageColorClosestHWB() local
487 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB()
488 if (first || (dist < mindist)) { in gdImageColorClosestHWB()
489 mindist = dist; in gdImageColorClosestHWB()
574 long rd, gd, bd, ad, dist; in gdImageColorResolveAlpha() local
598 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorResolveAlpha()
599 if (dist < mindist) in gdImageColorResolveAlpha()
601 if (dist == 0) in gdImageColorResolveAlpha()
605 mindist = dist; in gdImageColorResolveAlpha()