Antiprism 0.23
Classes | Functions

base/col_map.h File Reference

A colour map class. More...

#include <limits.h>
#include <string>
#include <map>
#include "rand_gen.h"
Include dependency graph for col_map.h:
This graph shows which files directly or indirectly include this file:

Classes

class  color_map
 A colour map class. More...
class  color_map_remap
 A colour map that remaps index numbers. More...
class  color_map_deal
 A colour map that maps index numbers to shuffled packs of numbers. More...
class  color_map_range
 A colour map using a range. More...
class  color_map_range_hsv
 A colour map using values in an HSVA range. More...
class  color_map_range_rgb
 A colour map using values in an RGBA range. More...
class  color_map_range_rand
 A colour map using random values in a range. More...
class  color_map_range_rand_hsv
 A colour map using random values in an HSVA range. More...
class  color_map_range_rand_rgb
 A colour map using random values in an RGBA range. More...
class  color_map_spread
 A colour map with a good spread of colours. More...
class  color_map_map
 A colour map with the mappings held in a map. More...
class  color_map_multi
 A colour map that looks up in other colour maps in order. More...

Functions

color_mapinit_color_map (const char *map_name, char *errmsg=0)
 Create a colour map from its name.

Detailed Description

A colour map class.


Function Documentation

color_map* init_color_map ( const char *  map_name,
char *  errmsg = 0 
)

Create a colour map from its name.

The map may be read from a file or generated.

Parameters:
map_namethe map name
errmsgan array at least MSG_SZ chars long to return any error message.
Returns:
a pointer to the dynamically allocated map which must be freed by the caller with delete, if is returned for an invalid map name and the error is detailed in errmsg.