Lines Matching refs:dist
282 long dist; in gdImageColorClosestAlpha() local
291 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorClosestAlpha()
292 if (first || (dist < mindist)) { in gdImageColorClosestAlpha()
293 mindist = dist; in gdImageColorClosestAlpha()
447 float dist; in gdImageColorClosestHWB() local
451 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB()
452 if (first || (dist < mindist)) { in gdImageColorClosestHWB()
453 mindist = dist; in gdImageColorClosestHWB()
538 long rd, gd, bd, ad, dist; in gdImageColorResolveAlpha() local
562 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorResolveAlpha()
563 if (dist < mindist) in gdImageColorResolveAlpha()
565 if (dist == 0) in gdImageColorResolveAlpha()
569 mindist = dist; in gdImageColorResolveAlpha()