| 2525 | } |
| 2526 | |
| 2527 | int Config::getIndexForColorSpace(const char * name) const |
| 2528 | { |
| 2529 | ConstColorSpaceRcPtr cs = getColorSpace(name); |
| 2530 | if (!cs) |
| 2531 | { |
| 2532 | return -1; |
| 2533 | } |
| 2534 | |
| 2535 | // Check to see if the name is an active color space. |
| 2536 | for (int idx = 0; idx < getNumColorSpaces(SEARCH_REFERENCE_SPACE_ALL, |
| 2537 | COLORSPACE_ACTIVE); ++idx) |
| 2538 | { |
| 2539 | if (strcmp(getColorSpaceNameByIndex(SEARCH_REFERENCE_SPACE_ALL, COLORSPACE_ACTIVE, idx), |
| 2540 | cs->getName()) == 0) |
| 2541 | { |
| 2542 | return idx; |
| 2543 | } |
| 2544 | } |
| 2545 | |
| 2546 | // Requests for an inactive color space or a role mapping |
| 2547 | // to an inactive color space will both fail. |
| 2548 | return -1; |
| 2549 | } |
| 2550 | |
| 2551 | void Config::setInactiveColorSpaces(const char * inactiveColorSpaces) |
| 2552 | { |