DATASERV (kappserv) functions


LIBRARY ROUTINE

kcolor_match_attribute - compare a color attribute between two data objects.

LIBRARY CALL

int kcolor_match_attribute(
   kobject  object1,
   kobject  object2,
   char    *attribute)

INPUT

OUTPUT

none

RETURN VALUE

TRUE (1) if the attribute matches, FALSE (0) otherwise

DESCRIPTION

This function is used to compare the value of a color attribute 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 the attribute in both objects is the same, then this function will return TRUE. If the values are different, then this function will return FALSE.

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

if (kcolor_match_attribute(obj1, obj2, KCOLOR_COLORSPACE)) kprintf("colorspace is the same in both objects"); if (kcolor_match_attribute(obj1, obj2, KCOLOR_MAP_OPERATION)) kprintf("colormap operation is 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

none

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.