GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
pngdriver/raster.c File Reference

GRASS png display driver - draw raster. More...

#include <string.h>
#include <math.h>
#include <grass/gis.h>
#include "driver.h"
#include "pngdriver.h"
Include dependency graph for pngdriver/raster.c:

Go to the source code of this file.

Macros

#define min(a, b)   ((a)<(b)?(a):(b))
 
#define max(a, b)   ((a)>(b)?(a):(b))
 

Functions

void PNG_begin_raster (int mask, int s[2][2], double fd[2][2])
 Start drawing raster. More...
 
int PNG_raster (int n, int row, const unsigned char *red, const unsigned char *grn, const unsigned char *blu, const unsigned char *nul)
 Draw raster row. More...
 

Detailed Description

GRASS png display driver - draw raster.

(C) 2003-2014 by Per Henrik Johansen and 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.

Author
Per Henrik Johansen (original contributor)
Glynn Clements

Definition in file pngdriver/raster.c.

Macro Definition Documentation

◆ max

#define max (   a,
  b 
)    ((a)>(b)?(a):(b))

Definition at line 25 of file pngdriver/raster.c.

◆ min

#define min (   a,
  b 
)    ((a)<(b)?(a):(b))

Definition at line 22 of file pngdriver/raster.c.

Function Documentation

◆ PNG_begin_raster()

void PNG_begin_raster ( int  mask,
int  s[2][2],
double  fd[2][2] 
)

Start drawing raster.

Parameters
masknon-zero int for mask
ssource (map) extent (left, right, top, bottom)
fddestination (image) extent (left, right, top, bottom)

Definition at line 80 of file pngdriver/raster.c.

◆ PNG_raster()

int PNG_raster ( int  n,
int  row,
const unsigned char *  red,
const unsigned char *  grn,
const unsigned char *  blu,
const unsigned char *  nul 
)

Draw raster row.

Parameters
nnumber of cells
rowraster row (starts at 0)
red,grn,blu,nulred,green,blue and null value
Returns
next row

Definition at line 111 of file pngdriver/raster.c.