GRASS Programmer's Manual 6.4.1(2011)
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.

Defines

#define MAX_COLORS   1024
#define DEVIATION   128

Functions

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

Define 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 DEVIATION, G_add_modular_color_rule(), G_init_colors(), G_set_color_range(), MAX_COLORS, and NULL.

Referenced by G_ask_colors().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines