Home | History | Annotate | Download | only in src

Lines Matching full:alpha

36 // alpha = Hab
39 #define SECTORS 16 // number of divisions in alpha and theta
45 cmsFloat64Number alpha;
61 cmsSpherical p; // Keep also alpha & theta of maximum
131 sp ->alpha = sp ->theta = 0;
135 sp ->alpha = _cmsAtan2(a, b);
150 sin_alpha = sin((M_PI * sp ->alpha) / 180.0);
151 cos_alpha = cos((M_PI * sp ->alpha) / 180.0);
168 void QuantizeToSector(const cmsSpherical* sp, int* alpha, int* theta)
170 *alpha = (int) floor(((sp->alpha * (SECTORS)) / 360.0) );
173 if (*alpha >= SECTORS)
174 *alpha = SECTORS-1;
325 int alpha, theta;
338 if (sp ->r < 0 || sp ->alpha < 0 || sp->theta < 0) {
344 QuantizeToSector(sp, &alpha, &theta);
346 if (alpha < 0 || theta < 0 || alpha >= SECTORS || theta >= SECTORS) {
352 return &gbd ->Gamut[theta][alpha];
439 int FindNearSectors(cmsGDB* gbd, int alpha, int theta, cmsGDBPoint* Close[])
448 a = alpha + Spiral[i].AdvX;
473 cmsBool InterpolateMissingSector(cmsGDB* gbd, int alpha, int theta)
486 if (gbd ->Gamut[theta][alpha].Type != GP_EMPTY) return TRUE;
489 nCloseSectors = FindNearSectors(gbd, alpha, theta, Close);
493 sp.alpha = (cmsFloat64Number) ((alpha + 0.5) * 360.0) / (SECTORS);
506 closel.alpha = 0;
531 templ.alpha >= (alpha*360.0/SECTORS) &&
532 templ.alpha <= ((alpha+1)*360.0/SECTORS)) {
539 gbd ->Gamut[theta][alpha].p = closel;
540 gbd ->Gamut[theta][alpha].Type = GP_MODELED;
551 int alpha, theta;
557 for (alpha = 0; alpha < SECTORS; alpha++) {
559 if (!InterpolateMissingSector(gbd, alpha, 0)) return FALSE;
563 for (alpha = 0; alpha < SECTORS; alpha++) {
565 if (!InterpolateMissingSector(gbd, alpha, SECTORS-1)) return FALSE;
571 for (alpha = 0; alpha < SECTORS; alpha++) {
573 if (!InterpolateMissingSector(gbd, alpha, theta)) return FALSE;