GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
pngdriver/graph_set.c File Reference

GRASS png display driver - set graphics processing. More...

#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <grass/gis.h>
#include <grass/colors.h>
#include <grass/glocale.h>
#include "pngdriver.h"
Include dependency graph for pngdriver/graph_set.c:

Go to the source code of this file.

Functions

int PNG_Graph_set (void)
 Start up graphics processing. More...
 
const char * PNG_Graph_get_file (void)
 Get render file. More...
 

Variables

struct png_state png
 

Detailed Description

GRASS png display driver - set graphics processing.

(C) 2003-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)
Glynn Clements

Definition in file pngdriver/graph_set.c.

Function Documentation

◆ PNG_Graph_get_file()

const char* PNG_Graph_get_file ( void  )

Get render file.

Returns
file name

Definition at line 180 of file pngdriver/graph_set.c.

References png_state::file_name, and png.

◆ PNG_Graph_set()

int PNG_Graph_set ( void  )

Start up graphics processing.

Anything that needs to be assigned, set up, started-up, or otherwise initialized happens here. This is called only at the startup of the graphics driver.

The external variables define the pixle limits of the graphics surface. The coordinate system used by the applications programs has the (0,0) origin in the upper left-hand corner. Hence, screen_left < screen_right screen_top < screen_bottom

Definition at line 82 of file pngdriver/graph_set.c.

References _, png_state::background, png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, DEFAULT_FG_COLOR, FILE_NAME, png_state::file_name, G_debug(), G_gisinit, G_str_to_color(), G_strcasecmp(), G_verbose_message(), getenv(), png_state::has_alpha, png_state::height, png, png_get_color(), png_init_color_table(), screen_height, screen_width, png_state::true_color, and png_state::width.

Variable Documentation

◆ png