GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71817
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pngdriver/draw_bitmap.c File Reference

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

#include <math.h>
#include "pngdriver.h"
Include dependency graph for pngdriver/draw_bitmap.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_draw_bitmap (int ncols, int nrows, int threshold, const unsigned char *buf)
 Draw bitmap. More...
 

Detailed Description

GRASS png display driver - draw bitmap.

(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/draw_bitmap.c.

Macro Definition Documentation

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

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

Referenced by PNG_draw_bitmap().

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

Definition at line 19 of file pngdriver/draw_bitmap.c.

Referenced by PNG_draw_bitmap().

Function Documentation

void PNG_draw_bitmap ( int  ncols,
int  nrows,
int  threshold,
const unsigned char *  buf 
)

Draw bitmap.

Parameters
ncols,nrowsnumber of columns and rows
thresholdthreshold value
bufdata buffer

Definition at line 33 of file pngdriver/draw_bitmap.c.

References b, png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, cur_x, cur_y, png_state::current_color, g, png_state::grid, max, min, png_state::modified, png, png_get_color(), png_get_pixel(), r, png_state::true_color, png_state::width, and x.

Referenced by PNG_Driver().