DATASERV (kappserv) functions


LIBRARY ROUTINE

kcolor_match_attributes - compare multiple attributes between two objects.

LIBRARY CALL

int kcolor_match_attributes(
   kobject  object1,
   kobject  object2
   kvalist)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) if all listed attributes match, FALSE (0) otherwise

DESCRIPTION

This function is used to compare the values of an arbitrary number of color attributes between two data objects.

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.

If the value of all attributes in both objects are the same, then this function will return TRUE. If any of the values are different, then this function will return FALSE.

The following example illustrates the use of the match attributes call to compare two different color attributes.

if (kcolor_match_attributes(obj1, obj2, KCOLOR_COLORSPACE, KCOLOR_MAP_OPERATION, NULL)) kprintf("colorspace and colormap operation are the same " "in both objects");

A complete list of color attributes can be found in Chapter 4 of Programming Services Volume II.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

Calling this function and forgetting to NULL terminate the variable argument list will not cause any compiler errors, but will often generate a segmentation fault.

MODIFICATION

none

FILES

$DATASERV/objects/library/kappserv/src/color.c

SEE ALSO

kappserv(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.