GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72636
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
color_rand.c File Reference
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/glocale.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

void Rast_make_random_colors (struct Colors *colors, CELL min, CELL max)
 make random colors More...
 

Macro Definition Documentation

#define DEVIATION   128

Definition at line 10 of file color_rand.c.

Referenced by Rast_make_random_colors().

#define MAX_COLORS   1024

Definition at line 9 of file color_rand.c.

Referenced by Rast_make_random_colors().

Function Documentation

void Rast_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

Definition at line 25 of file color_rand.c.

References _, _Color_Info_::blu, count, DEVIATION, G_fatal_error(), G_lrand48(), G_srand48_auto(), _Color_Info_::grn, MAX_COLORS, Rast_add_modular_c_color_rule(), Rast_init_colors(), Rast_set_c_color_range(), and _Color_Info_::red.