Loading...
Searching...
No Matches
pngdriver/set_window.c
Go to the documentation of this file.
/*!
\file lib/pngdriver/set_window.c
\brief GRASS png display driver - set window
(C) 2007-2014 by Glynn Clements 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)
\author Glynn Clements
*/
#include <math.h>
#include "pngdriver.h"
/*!
\brief Set window
\param t,b,l,r top, bottom, left, right
*/
void PNG_Set_window(double t, double b, double l, double r)
{
png.clip_top = t > 0 ? t : 0;
png.clip_bot = b < png.height ? b : png.height;
png.clip_left = l > 0 ? l : 0;
png.clip_rite = r < png.width ? r : png.width;
}
b
double b
Definition driver/set_window.c:5
l
double l
Definition driver/set_window.c:5
t
double t
Definition driver/set_window.c:5
r
double r
Definition driver/set_window.c:5
png
struct png_state png
Definition pngdriver/graph_set.c:32
PNG_Set_window
void PNG_Set_window(double t, double b, double l, double r)
Set window.
Definition pngdriver/set_window.c:23
pngdriver.h
GRASS png display driver - header file.