grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

draw_bitmap.c File Reference

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

#include <math.h>
#include "pngdriver.h"
Include dependency graph for draw_bitmap.c:

Go to the source code of this file.


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


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.

Per Henrik Johansen (original contributor)
Glynn Clements

Definition in file draw_bitmap.c.

Macro Definition Documentation

◆ max

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

Definition at line 22 of file draw_bitmap.c.

◆ min

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

Definition at line 19 of file draw_bitmap.c.

Function Documentation

◆ PNG_draw_bitmap()

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

Draw bitmap.

ncols,nrowsnumber of columns and rows
thresholdthreshold value
bufdata buffer

Definition at line 33 of file draw_bitmap.c.

References a, a0, a1, b, b0, 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, ncols, png, png_get_color(), png_get_pixel(), r, png_state::true_color, png_state::width, and x.

Referenced by PNG_Driver().