Loading...
Searching...
No Matches
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)
#define | max(a, b)

## Functions

void | PNG_begin_raster (int mask, int s[2][2], double fd[2][2])
| Start drawing 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.

## 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 )

Value:
((a) > (b) ? (a) : (b))
b
double b
Definition driver/set_window.c:5

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

Referenced by PNG_raster().

## min

#define min | ( |  | a,
|  |  | b )

Value:
((a) < (b) ? (a) : (b))

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

Referenced by PNG_raster().

## Function Documentation

## PNG_begin_raster()

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

Start drawing raster.

Parameters

  mask | non-zero int for mask
  s | source (map) extent (left, right, top, bottom)
  fd | destination (image) extent (left, right, top, bottom)

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

Referenced by PNG_Driver().

## 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

  n | number of cells
  row | raster row (starts at 0)
  red,grn,blu,nul | red,green,blue and null value

Returns
  next row

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

References max, min, png, png_get_color(), and x.

Referenced by PNG_Driver().