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

Go to the source code of this file.

Functions

int D_set_overlay_mode (int n)
 configure raster overlay mode More...
 
int D_color (CELL cat, struct Colors *colors)
 
int D_c_color (CELL cat, struct Colors *colors)
 
int D_d_color (DCELL val, struct Colors *colors)
 Same functionality as D_color() except that the value is type DCELL. This implies that the floating-point interfaces to the colors are used by this routine. More...
 
int D_f_color (FCELL val, struct Colors *colors)
 Same functionality as D_color() except that the value is type FCELL. This implies that the floating-point interfaces to the colors are used by this routine. More...
 
int D_color_of_type (const void *raster, struct Colors *colors, RASTER_MAP_TYPE data_type)
 If the data_type is CELL_TYPE, calls D_color((CELL *value, colors); If the data_type is FCELL_TYPE, calls D_f_color((FCELL *value, colors); If the data_type is DCELL_TYPE, calls D_d_color((DCELL *value, colors);. More...
 

Variables

int D__overlay_mode = 0
 

Function Documentation

int D_c_color ( CELL  cat,
struct Colors *  colors 
)

Definition at line 74 of file raster2.c.

References D_color_of_type().

Referenced by D_color().

int D_color ( CELL  cat,
struct Colors *  colors 
)

Definition at line 68 of file raster2.c.

References D_c_color().

int D_color_of_type ( const void *  raster,
struct Colors *  colors,
RASTER_MAP_TYPE  data_type 
)

If the data_type is CELL_TYPE, calls D_color((CELL *value, colors); If the data_type is FCELL_TYPE, calls D_f_color((FCELL *value, colors); If the data_type is DCELL_TYPE, calls D_d_color((DCELL *value, colors);.

Parameters
value
colors
data_type
Returns
int

Definition at line 134 of file raster2.c.

References b, g, G_get_raster_color(), r, and R_RGB_color().

Referenced by D_c_color(), D_d_color(), and D_f_color().

int D_d_color ( DCELL  val,
struct Colors *  colors 
)

Same functionality as D_color() except that the value is type DCELL. This implies that the floating-point interfaces to the colors are used by this routine.

Parameters
value
colors
Returns
int

Definition at line 93 of file raster2.c.

References D_color_of_type().

int D_f_color ( FCELL  val,
struct Colors *  colors 
)

Same functionality as D_color() except that the value is type FCELL. This implies that the floating-point interfaces to the colors are used by this routine.

Parameters
value
colors
Returns
int

Definition at line 112 of file raster2.c.

References D_color_of_type().

int D_set_overlay_mode ( int  n)

configure raster overlay mode

This routine determines if D_draw_cell draws in overlay mode (locations with category 0 are left untouched) or not (colored with the color for category 0). Set flag to 1 (TRUE) for overlay mode; 0 (FALSE) otherwise.

Parameters
flag
Returns
int

Definition at line 50 of file raster2.c.

References D__overlay_mode.

Variable Documentation

int D__overlay_mode = 0

Definition at line 35 of file raster2.c.

Referenced by D_cell_draw_setup(), D_draw_raster_RGB(), and D_set_overlay_mode().