GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
|
Display Driver - draw raster data. More...
#include <stdio.h>
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/display.h>
#include "driver.h"
Go to the source code of this file.
Functions | |
int | D_draw_raster (int A_row, const void *array, struct Colors *colors, RASTER_MAP_TYPE data_type) |
Draw raster row. More... | |
int | D_draw_d_raster (int A_row, const DCELL *darray, struct Colors *colors) |
Draw raster row (DCELL) More... | |
int | D_draw_f_raster (int A_row, const FCELL *farray, struct Colors *colors) |
Draw raster row (FCELL) More... | |
int | D_draw_c_raster (int A_row, const CELL *carray, struct Colors *colors) |
Draw raster row (CELL) More... | |
void | D_raster_draw_begin (void) |
Prepare for raster graphic. More... | |
int | D_draw_raster_RGB (int A_row, const void *r_raster, const void *g_raster, const void *b_raster, struct Colors *r_colors, struct Colors *g_colors, struct Colors *b_colors, RASTER_MAP_TYPE r_type, RASTER_MAP_TYPE g_type, RASTER_MAP_TYPE b_type) |
Draw raster row in RGB mode. More... | |
void | D_raster_draw_end (void) |
Finish raster rendering. More... | |
Variables | |
int | D__overlay_mode |
Display Driver - draw raster data.
(C) 2006-2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file display/raster.c.
Draw raster row (CELL)
The row gives the map array row. The carray array provides the categories for each raster value in that row. This routine is called consecutively with the information necessary to draw a raster image from north to south. No rows can be skipped. All screen pixel rows which represent the current map array row are rendered. The routine returns the map array row which is needed to draw the next screen pixel row.
A_row | row number (starts at 0) |
carray | data buffer |
colors | pointer to Colors structure |
Definition at line 105 of file display/raster.c.
Draw raster row (DCELL)
A_row | row number (starts at 0) |
darray | data buffer |
colors | pointer to Colors structure |
Definition at line 67 of file display/raster.c.
Draw raster row (FCELL)
A_row | row number (starts at 0) |
farray | data buffer |
colors | pointer to Colors structure |
Definition at line 82 of file display/raster.c.
int D_draw_raster | ( | int | A_row, |
const void * | array, | ||
struct Colors * | colors, | ||
RASTER_MAP_TYPE | data_type | ||
) |
Draw raster row.
Presumes the map is drawn from north to south.
If overlay mode is desired, then call D_set_overlay_mode() first.
A_row | row number (starts at 0) |
array | data buffer |
colors | pointer to Colors structure |
data_type | raster type (CELL, FCELL, DCELL) |
Definition at line 51 of file display/raster.c.
int D_draw_raster_RGB | ( | int | A_row, |
const void * | r_raster, | ||
const void * | g_raster, | ||
const void * | b_raster, | ||
struct Colors * | r_colors, | ||
struct Colors * | g_colors, | ||
struct Colors * | b_colors, | ||
RASTER_MAP_TYPE | r_type, | ||
RASTER_MAP_TYPE | g_type, | ||
RASTER_MAP_TYPE | b_type | ||
) |
Draw raster row in RGB mode.
A_row | row number (starts at 0) |
r_raster | red data buffer |
g_raster | green data buffer |
b_raster | blue data buffer |
r_colors | colors used for red channel |
g_colors | colors used for green channel |
b_colors | colors used for blue channel |
r_type | raster type used for red channel |
g_type | raster type used for red channel |
b_type | raster type used for red channel |
Definition at line 177 of file display/raster.c.
void D_raster_draw_begin | ( | void | ) |
Prepare for raster graphic.
The raster display subsystem establishes conversion parameters based on the screen extent defined by top, bottom, left, and right, all of which are obtainable from D_get_dst() for the current frame.
Definition at line 152 of file display/raster.c.
References D_get_a().
void D_raster_draw_end | ( | void | ) |
Finish raster rendering.
Definition at line 231 of file display/raster.c.
References COM_end_raster().
int D__overlay_mode |
Definition at line 36 of file raster2.c.
Referenced by D_set_overlay_mode().