GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
draw_point.c
Go to the documentation of this file.
1 #include <math.h>
2 #include "pngdriver.h"
3 
4 void PNG_draw_point(double fx, double fy)
5 {
6  int x = (int) floor(fx + 0.5);
7  int y = (int) floor(fy + 0.5);
8 
9  if (x < png.clip_left || x >= png.clip_rite || y < png.clip_top || y >= png.clip_bot)
10  return;
11 
12  png.grid[y * png.width + x] = png.current_color;
13 
14  png.modified = 1;
15 }
int width
Definition: pngdriver.h:43
int current_color
Definition: pngdriver.h:34
GRASS png display driver - header file.
double y
Definition: path.h:12
void PNG_draw_point(double fx, double fy)
Definition: draw_point.c:4
double clip_rite
Definition: pngdriver.h:42
double clip_bot
Definition: pngdriver.h:42
#define x
struct png_state png
int modified
Definition: pngdriver.h:47
unsigned int * grid
Definition: pngdriver.h:44