245 |
|
return(real_check(colval(c1,p), colval(c2,p))); |
246 |
|
} |
247 |
|
|
248 |
+ |
#if 1 |
249 |
|
/* Compare two color spectra for equivalence */ |
250 |
|
static int |
251 |
|
spec_check(COLORV *sc1, COLORV *sc2) |
262 |
|
|
263 |
|
return(real_check(sc1[p], sc2[p])); |
264 |
|
} |
265 |
+ |
#else |
266 |
+ |
/* Compare two color spectra for equivalence */ |
267 |
+ |
static int |
268 |
+ |
spec_check(COLORV *sc1, COLORV *sc2) |
269 |
+ |
{ |
270 |
+ |
COLOR c1, c2; |
271 |
+ |
int p; |
272 |
+ |
|
273 |
+ |
if (!real_check(scolor_mean(sc1), scolor_mean(sc2))) |
274 |
+ |
return(0); |
275 |
+ |
/* do comparisons in RGB space */ |
276 |
+ |
scolor_rgb(c1, sc1); |
277 |
+ |
scolor_rgb(c2, sc2); |
278 |
+ |
|
279 |
+ |
p = (colval(c1,GRN) > colval(c1,RED)) ? GRN : RED; |
280 |
+ |
if (colval(c1,BLU) > colval(c1,p)) p = BLU; |
281 |
+ |
|
282 |
+ |
return(real_check(colval(c1,p), colval(c2,p))); |
283 |
+ |
} |
284 |
+ |
#endif |
285 |
|
|
286 |
|
/* Compare two normal directions for equivalence */ |
287 |
|
static int |