| 2425 | */ |
| 2426 | |
| 2427 | int /* O - Horizontal/cross feed resolution or 0 */ |
| 2428 | ippGetResolution( |
| 2429 | ipp_attribute_t *attr, /* I - IPP attribute */ |
| 2430 | int element, /* I - Value number (0-based) */ |
| 2431 | int *yres, /* O - Vertical/feed resolution */ |
| 2432 | ipp_res_t *units) /* O - Units for resolution */ |
| 2433 | { |
| 2434 | /* |
| 2435 | * Range check input... |
| 2436 | */ |
| 2437 | |
| 2438 | if (!attr || attr->value_tag != IPP_TAG_RESOLUTION || |
| 2439 | element < 0 || element >= attr->num_values) |
| 2440 | { |
| 2441 | if (yres) |
| 2442 | *yres = 0; |
| 2443 | |
| 2444 | if (units) |
| 2445 | *units = (ipp_res_t)0; |
| 2446 | |
| 2447 | return (0); |
| 2448 | } |
| 2449 | |
| 2450 | /* |
| 2451 | * Return the value... |
| 2452 | */ |
| 2453 | |
| 2454 | if (yres) |
| 2455 | *yres = attr->values[element].resolution.yres; |
| 2456 | |
| 2457 | if (units) |
| 2458 | *units = attr->values[element].resolution.units; |
| 2459 | |
| 2460 | return (attr->values[element].resolution.xres); |
| 2461 | } |
| 2462 | |
| 2463 | |
| 2464 | /* |
no outgoing calls