Lines Matching refs:dist
280 long dist; in gdImageColorClosestAlpha() local
289 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorClosestAlpha()
290 if (first || (dist < mindist)) { in gdImageColorClosestAlpha()
291 mindist = dist; in gdImageColorClosestAlpha()
445 float dist; in gdImageColorClosestHWB() local
449 dist = HWB_Diff(im->red[i], im->green[i], im->blue[i], r, g, b); in gdImageColorClosestHWB()
450 if (first || (dist < mindist)) { in gdImageColorClosestHWB()
451 mindist = dist; in gdImageColorClosestHWB()
536 long rd, gd, bd, ad, dist; in gdImageColorResolveAlpha() local
560 dist = rd * rd + gd * gd + bd * bd + ad * ad; in gdImageColorResolveAlpha()
561 if (dist < mindist) in gdImageColorResolveAlpha()
563 if (dist == 0) in gdImageColorResolveAlpha()
567 mindist = dist; in gdImageColorResolveAlpha()