Functions | |
HC_BOOLEAN | PShow_Net_Color_Map (int key_count, const HC_KEY *path_keys, char *colors) |
Similar to Show_Color_Map(), but returns the net effective setting along a discrete segment path. More... | |
void | Show_Color_Map (char *colors) |
Returns the color map that has been set on the currently open segment by a previous call to Set_Color_Map(). More... | |
Detailed Description
Function Documentation
◆ PShow_Net_Color_Map()
HC_BOOLEAN PShow_Net_Color_Map | ( | int | key_count, |
const HC_KEY * | path_keys, | ||
char * | colors | ||
) |
Similar to Show_Color_Map(), but returns the net effective setting along a discrete segment path.
- Parameters
-
key_count The size of pathkeys path_keys An array of HC_KEY's delineating a path of segments. colors A long string that contains English descriptions of the desired colors, separated by commas within the string. Note that the "by value" routines below are the ones most people use. Passed by reference. Returned to user.
DETAILS
As with all PShow_Net_* routines, pathkeys[0] represents the lowest (a.k.a the "most local" or "leaf"), and pathkeys[keycount-1] represents the highest segment. If the path is incomplete, missing segments are filled in if possible. Missing segments must be part of the same direct ancestry in order to be filled in. If the desired path contains an include link, the shortest unambiguous set of pathkeys would be [leaf, includelink, root], where includelink is the return value from Include_Segment().
By default, HOOPS will determine the Net attribute from the last specified key all the way to the root. If you add -1 at the end of the array, the PShow_Net routines will not proceed beyond the end of the last specified key.
For other details, see Show_Color_Map()
◆ Show_Color_Map()
void Show_Color_Map | ( | char * | colors | ) |
Returns the color map that has been set on the currently open segment by a previous call to Set_Color_Map().
- Parameters
-
colors A long string that contains English descriptions of the desired colors, separated by commas within the string. Note that the "by value" routines below are the ones most people use. Passed by reference. Returned to user.
DETAILS
No additional details. See Set_Color_Map()
NOTES
The Show_Color_Map() routines return the actual attribute values stored in the particular segment at hand. The Show_Net_Color_Map() routines return the effective attribute value for the specified segment. The distinction is that there may or may not be an "actual" stored value for an attribute for a given segment, but there is guaranteed always to be an effective value for every attribute for every segment. Also, "Show Net" will return the cumulative effects of those attributes that concatenate as you go up and down the segment tree (Modelling Matrices and Windows).
When the value being passed back is a string, be sure you've declared your string variable to be long enough.
In C, "passed by reference" means that you have to allocate an appropriate variable, either statically or off the stack, and pass a pointer to that variable to the HOOPS routine. To generate a pointer to a variable C, you prefix the variable with a "&". In other languages you normally don't have to do anything different from usual.
The Show_Color_Map() routines will complain if they're called and the attribute is not actually set in the segment. Use Show_Existence() to avoid this, if necessary.