GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73685
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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

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

Referenced by PNG_raster().

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

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

Referenced by PNG_raster().

Function Documentation

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.

References dst, and int.

Referenced by PNG_Driver().

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.

References png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, dst, png_state::grid, max, min, png_state::modified, png, png_get_color(), png_state::width, x, and line_pnts::y.

Referenced by PNG_Driver().