GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
Loading...
Searching...
No Matches
pngdriver/set_window.c
Go to the documentation of this file.
1/*!
2 \file lib/pngdriver/set_window.c
3
4 \brief GRASS png display driver - set window
5
6 (C) 2007-2014 by Glynn Clements and the GRASS Development Team
7
8 This program is free software under the GNU General Public License
9 (>=v2). Read the file COPYING that comes with GRASS for details.
10
11 \author Per Henrik Johansen (original contributor)
12 \author Glynn Clements
13 */
14
15#include <math.h>
16#include "pngdriver.h"
17
18/*!
19 \brief Set window
20
21 \param t,b,l,r top, bottom, left, right
22 */
23void PNG_Set_window(double t, double b, double l, double r)
24{
25 png.clip_top = t > 0 ? t : 0;
27 png.clip_left = l > 0 ? l : 0;
28 png.clip_rite = r < png.width ? r : png.width;
29}
double b
double l
double t
double r
struct png_state png
void PNG_Set_window(double t, double b, double l, double r)
Set window.
GRASS png display driver - header file.
double clip_left
Definition pngdriver.h:41
double clip_bot
Definition pngdriver.h:41
double clip_top
Definition pngdriver.h:41
int height
Definition pngdriver.h:42
int width
Definition pngdriver.h:42
double clip_rite
Definition pngdriver.h:41