Lines Matching refs:dist
274 long dist; in gdImageColorClosestAlpha() local
283 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorClosestAlpha()
284 if (first || (dist < mindist)) { in gdImageColorClosestAlpha()
285 mindist = dist; in gdImageColorClosestAlpha()
439 float dist; in gdImageColorClosestHWB() local
443 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB()
444 if (first || (dist < mindist)) { in gdImageColorClosestHWB()
445 mindist = dist; in gdImageColorClosestHWB()
530 long rd, gd, bd, ad, dist; in gdImageColorResolveAlpha() local
554 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorResolveAlpha()
555 if (dist < mindist) in gdImageColorResolveAlpha()
557 if (dist == 0) in gdImageColorResolveAlpha()
561 mindist = dist; in gdImageColorResolveAlpha()