GRASS GIS 7 Programmer's Manual  7.0.4(2016)-r00000
pngdriver/set_window.c
Go to the documentation of this file.
1 
15 #include <math.h>
16 #include "pngdriver.h"
17 
23 void PNG_Set_window(double t, double b, double l, double r)
24 {
25  png.clip_top = t > 0 ? t : 0;
26  png.clip_bot = b < png.height ? b : png.height;
27  png.clip_left = l > 0 ? l : 0;
28  png.clip_rite = r < png.width ? r : png.width;
29 }
int width
Definition: pngdriver.h:43
double clip_left
Definition: pngdriver.h:42
GRASS png display driver - header file.
void PNG_Set_window(double t, double b, double l, double r)
Set window.
int height
Definition: pngdriver.h:43
double clip_top
Definition: pngdriver.h:42
double l
double clip_rite
Definition: pngdriver.h:42
double clip_bot
Definition: pngdriver.h:42
struct png_state png
double b
double t
double r