Lines Matching refs:dist
288 long dist; in gdImageColorClosestAlpha() local
297 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorClosestAlpha()
298 if (first || (dist < mindist)) { in gdImageColorClosestAlpha()
299 mindist = dist; in gdImageColorClosestAlpha()
453 float dist; in gdImageColorClosestHWB() local
457 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB()
458 if (first || (dist < mindist)) { in gdImageColorClosestHWB()
459 mindist = dist; in gdImageColorClosestHWB()
544 long rd, gd, bd, ad, dist; in gdImageColorResolveAlpha() local
568 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorResolveAlpha()
569 if (dist < mindist) in gdImageColorResolveAlpha()
571 if (dist == 0) in gdImageColorResolveAlpha()
575 mindist = dist; in gdImageColorResolveAlpha()