color_get.c File Reference

#include <grass/gis.h>

Include dependency graph for color_get.c:

Go to the source code of this file.

Functions

int G_get_color (CELL n, int *red, int *grn, int *blu, struct Colors *colors)
 get a category color
int G_get_raster_color (void *rast, int *red, int *grn, int *blu, struct Colors *colors, RASTER_MAP_TYPE map_type)
 Looks up the rgb colors for v in the color table colors.
int G_get_c_raster_color (CELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
 Calls G_get_color(*v, r, g, b, colors).
int G_get_f_raster_color (FCELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
 Looks up the rgb colors for v in the color table colors.
int G_get_d_raster_color (DCELL *rast, int *red, int *grn, int *blu, struct Colors *colors)
 Looks up the rgb colors for v in the color table colors.
int G_get_null_value_color (int *red, int *grn, int *blu, struct Colors *colors)
 Puts the red, green, and blue components of the color for the NULL-value into r,g,b.
int G_get_default_color (int *red, int *grn, int *blu, struct Colors *colors)
 Puts the red, green, and blue components of the "default" color into r,g,b.


Function Documentation

int G_get_c_raster_color ( CELL *  rast,
int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

Calls G_get_color(*v, r, g, b, colors).

Parameters:
v 
r 
g 
b 
colors 
Returns:
int

Definition at line 91 of file color_get.c.

References b, g, G_lookup_raster_colors(), and r.

int G_get_color ( CELL  n,
int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

get a category color

The red, green, and blue intensities for the color associated with category cat are extracted from the colors structure. The intensities will be in the range 0 ­- 255.

Parameters:
cat 
red 
green 
blue 
colors 
Returns:
int
Modified to return a color for the NULL-value.

Returns:
int

Definition at line 31 of file color_get.c.

References b, g, G_lookup_colors(), and r.

int G_get_d_raster_color ( DCELL *  rast,
int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

Looks up the rgb colors for v in the color table colors.

Parameters:
v 
r 
g 
b 
colors 
Returns:
int

Definition at line 149 of file color_get.c.

References b, g, G_lookup_raster_colors(), and r.

int G_get_default_color ( int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

Puts the red, green, and blue components of the "default" color into r,g,b.

Parameters:
r 
g 
b 
colors 
Returns:
int

Definition at line 212 of file color_get.c.

Referenced by G__lookup_colors().

int G_get_f_raster_color ( FCELL *  rast,
int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

Looks up the rgb colors for v in the color table colors.

Parameters:
v 
r 
g 
b 
colors 
Returns:
int

Definition at line 120 of file color_get.c.

References b, g, G_lookup_raster_colors(), and r.

int G_get_null_value_color ( int *  red,
int *  grn,
int *  blu,
struct Colors *  colors 
)

Puts the red, green, and blue components of the color for the NULL-value into r,g,b.

Parameters:
r 
g 
b 
colors 
Returns:
int

Definition at line 177 of file color_get.c.

Referenced by G__lookup_colors().

int G_get_raster_color ( void *  rast,
int *  red,
int *  grn,
int *  blu,
struct Colors *  colors,
RASTER_MAP_TYPE  map_type 
)

Looks up the rgb colors for v in the color table colors.

Parameters:
v 
r 
g 
b 
colors 
data_type 
Returns:
int

Definition at line 62 of file color_get.c.

References b, g, G_lookup_raster_colors(), and r.


Generated on Sun Apr 6 17:32:16 2008 for GRASS by  doxygen 1.5.5