ColorSet Class Reference

#include <lemon/graph_to_eps.h>

Inherits MapBase< int, Color >.

Inheritance diagram for ColorSet:

Inheritance graph
[legend]
List of all members.

Detailed Description

This map assigns one of the predefined Colors to each int. It is possible to change the colors as well as their number. The integer range is cyclically mapped to the provided set of colors.

This is a true reference map, so you can also change the actual colors.


Public Member Functions

 ColorSet (bool have_white=false, int num=0)
 Constructor.
Coloroperator[] (int i)
 
const Coloroperator[] (int i) const
 
void set (int i, const Color &c)
 
void resize (int s)
 Sets the number of the exiting colors.
std::size_t size () const
 Returns the number of the existing colors.


Constructor & Destructor Documentation

ColorSet bool  have_white = false,
int  num = 0
[inline]
 

Constructor

Parameters:
have_white indicates whether white is amongst the provided color (true) or not (false). If it is true, white will be assigned to 0.
num the number of the allocated colors. If it is 0 the default color configuration is set up (26 color plus the while). If num is less then 26/27 then the default color list is cut. Otherwise the color list is filled repeatedly with the default color list. (The colors can be changed later on.)


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:41:36 2006 for LEMON by  doxygen 1.4.6