GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
color_rand.c File Reference
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
Include dependency graph for color_rand.c:

Go to the source code of this file.

Macros

#define MAX_COLORS   1024
 
#define DEVIATION   128
 

Functions

int G_make_random_colors (struct Colors *colors, CELL min, CELL max)
 make random colors More...
 

Macro Definition Documentation

#define DEVIATION   128

Definition at line 7 of file color_rand.c.

Referenced by G_make_random_colors().

#define MAX_COLORS   1024

Definition at line 6 of file color_rand.c.

Referenced by G_make_random_colors().

Function Documentation

int G_make_random_colors ( struct Colors *  colors,
CELL  min,
CELL  max 
)

make random colors

Generates random colors. Good as a first pass at a color table for nominal data.

Parameters
colors
min
max
Returns
int

Definition at line 22 of file color_rand.c.

References count, DEVIATION, G_add_modular_color_rule(), G_init_colors(), G_set_color_range(), MAX_COLORS, n, and NULL.

Referenced by G_ask_colors().