int kcolor_get_attribute(
kobject object,
char *attribute,
kvalist)
The variable argument list takes the form:
ATTRIBUTE_NAME, &value1 [, &value2, ...]
The number of value arguments in the variable argument list corresponds to the number of arguments needed to retrieve the attribute.
none
This color service function should be used in conjunction with other application services such as polymorphic data services and geometry data services. This function will work on data objects opened or created with either of those services.
Attributes are retrieved by passing in the address of a variable by which the attribute can be returned. Note that any array attributes, such as strings, which are retrieved should not be altered or freed. The pointer returned points to the actual internal storage array. A copy should be made if the values need to be changed.
The following example illustrates the use of the get attribute call to retrieve two different color attributes.
char **autocolor_list;
int num;
int colorspace;
kcolor_get_attribute(object,
KCOLOR_AUTOCOLOR_LIST, &list, &num);
kcolor_get_attribute(object,
KCOLOR_COLORSPACE, &colorspace);
A complete list of color attributes can be found in Chapter 4 of Programming Services Volume II.
none
none
$DATASERV/objects/library/kappserv/src/color.c