GRASS GIS 8 Programmer's Manual 8.3.2(2024)-exported
|
GRASS png display driver - header file. More...
Go to the source code of this file.
Data Structures | |
struct | png_state |
Macros | |
#define | FILE_NAME "map.png" |
#define | HEADER_SIZE 64 |
Functions | |
void | read_image (void) |
void | read_ppm (void) |
void | read_pgm (void) |
void | read_bmp (void) |
void | read_png (void) |
void | write_image (void) |
void | write_ppm (void) |
void | write_pgm (void) |
void | write_bmp (void) |
void | write_png (void) |
void | png_init_color_table (void) |
unsigned int | png_get_color (int, int, int, int) |
void | png_get_pixel (unsigned int, int *, int *, int *, int *) |
void | png_draw_line (double, double, double, double) |
void | png_polygon (struct path *) |
Draw polygon. | |
const struct driver * | PNG_Driver (void) |
Initialize display driver. | |
void | PNG_Box (double, double, double, double) |
Draw a (filled) rectangle. | |
void | PNG_Client_Close (void) |
void | PNG_Erase (void) |
Erase screen. | |
void | PNG_Graph_close (void) |
Close down the graphics processing. This gets called only at driver termination time. | |
int | PNG_Graph_set (void) |
Start up graphics processing. | |
const char * | PNG_Graph_get_file (void) |
Get render file. | |
void | PNG_Line_width (double) |
Set line width. | |
void | PNG_begin_raster (int, int[2][2], double[2][2]) |
Start drawing raster. | |
int | PNG_raster (int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *) |
void | PNG_Begin (void) |
void | PNG_Move (double, double) |
void | PNG_Cont (double, double) |
void | PNG_Close (void) |
void | PNG_Stroke (void) |
void | PNG_Fill (void) |
void | PNG_Point (double, double) |
Draw point. | |
void | PNG_Set_window (double, double, double, double) |
Set window. | |
void | PNG_color_rgb (int, int, int) |
Identify a color. | |
void | PNG_draw_bitmap (int, int, int, const unsigned char *) |
Draw bitmap. | |
Variables | |
struct png_state | png |
GRASS png display driver - header file.
(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.
Definition in file pngdriver.h.
#define FILE_NAME "map.png" |
Definition at line 27 of file pngdriver.h.
#define HEADER_SIZE 64 |
Definition at line 29 of file pngdriver.h.
|
extern |
Definition at line 21 of file pngdriver/draw.c.
References path_begin().
Referenced by PNG_Driver().
|
extern |
Start drawing raster.
mask | non-zero int for mask |
s | source (map) extent (left, right, top, bottom) |
fd | destination (image) extent (left, right, top, bottom) |
Definition at line 80 of file pngdriver/raster.c.
Referenced by PNG_Driver().
|
extern |
Draw a (filled) rectangle.
fx1,fy1,fx2,fy2 | rectangle coordinates |
Definition at line 24 of file pngdriver/box.c.
References png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, png_state::current_color, png_state::grid, png_state::height, png_state::modified, png, png_state::width, and x.
Referenced by PNG_Driver(), and PNG_Point().
|
extern |
|
extern |
Definition at line 36 of file pngdriver/draw.c.
References path_close().
Referenced by PNG_Driver().
|
extern |
Identify a color.
Identify a color that has been set in the reset_color() (found in Reset_clr.c file in this directory). Subsequent graphics calls will use this color.
Called by: Color() in ../lib/Color.c
r | red color value |
g | green color value |
b | blue color value |
Definition at line 32 of file pngdriver/color.c.
References b, png_state::current_color, g, png, png_get_color(), and r.
Referenced by PNG_Driver().
|
extern |
Definition at line 31 of file pngdriver/draw.c.
References path_cont(), and x.
Referenced by PNG_Driver().
|
extern |
Draw bitmap.
ncols,nrows | number of columns and rows |
threshold | threshold value |
buf | data buffer |
Definition at line 33 of file pngdriver/draw_bitmap.c.
References b, png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, cur_x, cur_y, png_state::current_color, g, png_state::grid, max, min, png_state::modified, png, png_get_color(), png_get_pixel(), r, png_state::true_color, png_state::width, and x.
Referenced by PNG_Driver().
|
extern |
Definition at line 68 of file draw_line.c.
References path::alloc, path::count, png_state::linewidth, png_state::modified, path_close(), path_cont(), path_move(), png, png_polygon(), path::start, and path::vertices.
Referenced by PNG_Stroke().
|
extern |
Initialize display driver.
Definition at line 21 of file pngdriver/driver.c.
References driver::Begin, driver::Begin_raster, driver::Bitmap, driver::Box, driver::Close, driver::Color, driver::Cont, driver::End_raster, driver::Erase, driver::Fill, driver::Font_info, driver::Font_list, driver::Graph_close, driver::Graph_get_file, driver::Graph_set, driver::Line_width, driver::Move, driver::name, NULL, PNG_Begin(), PNG_begin_raster(), PNG_Box(), PNG_Close(), PNG_color_rgb(), PNG_Cont(), PNG_draw_bitmap(), PNG_Erase(), PNG_Fill(), PNG_Graph_close(), PNG_Graph_get_file(), PNG_Graph_set(), PNG_Line_width(), PNG_Move(), PNG_Point(), PNG_raster(), PNG_Set_window(), PNG_Stroke(), driver::Point, driver::Raster, driver::Set_font, driver::Set_window, driver::Stroke, driver::Text, and driver::Text_box.
|
extern |
Erase screen.
Definition at line 20 of file pngdriver/erase.c.
References png_state::background, png_state::grid, png_state::height, png_state::modified, png, and png_state::width.
Referenced by PNG_Driver(), and PNG_Graph_set().
|
extern |
Definition at line 46 of file pngdriver/draw.c.
References png_polygon().
Referenced by PNG_Driver().
|
extern |
Definition at line 118 of file color_table.c.
References b, g, png, r, and png_state::true_color.
Referenced by PNG_color_rgb(), PNG_draw_bitmap(), PNG_Graph_set(), PNG_raster(), read_bmp(), read_pgm(), read_png(), and read_ppm().
|
extern |
Definition at line 110 of file color_table.c.
References b, g, png, r, and png_state::true_color.
Referenced by PNG_draw_bitmap(), write_bmp(), write_pgm(), write_png(), and write_ppm().
|
extern |
Close down the graphics processing. This gets called only at driver termination time.
Definition at line 50 of file pngdriver/graph_close.c.
References G_free(), png_state::grid, png_state::mapped, png, and write_image().
Referenced by PNG_Driver().
|
extern |
Get render file.
Definition at line 179 of file pngdriver/graph_set.c.
References png_state::file_name, and png.
Referenced by PNG_Driver().
|
extern |
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 81 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, FILE_NAME, png_state::file_name, G_debug(), G_str_to_color(), G_strcasecmp(), G_verbose_message(), png_state::grid, png_state::has_alpha, png_state::height, png_state::mapped, png_state::modified, png, PNG_Erase(), png_get_color(), png_init_color_table(), read_image(), screen_height, screen_width, png_state::true_color, png_state::width, and write_image().
Referenced by PNG_Driver().
|
extern |
Definition at line 72 of file color_table.c.
References png, and png_state::true_color.
Referenced by PNG_Graph_set().
|
extern |
Set line width.
width | line width (double precision) |
Definition at line 23 of file pngdriver/line_width.c.
References png_state::linewidth, and png.
Referenced by PNG_Driver().
|
extern |
Definition at line 26 of file pngdriver/draw.c.
References path_move(), and x.
Referenced by PNG_Driver().
|
extern |
|
extern |
Draw polygon.
Definition at line 135 of file pngdriver/polygon.c.
References path::count, vertex::mode, png_state::modified, P_CLOSE, path_close(), png, and path::vertices.
Referenced by png_draw_line(), and PNG_Fill().
|
extern |
Referenced by PNG_Driver().
|
extern |
Set window.
t,b,l,r | top, bottom, left, right |
Definition at line 23 of file pngdriver/set_window.c.
References b, png_state::clip_bot, png_state::clip_left, png_state::clip_rite, png_state::clip_top, png_state::height, l, png, r, t, and png_state::width.
Referenced by PNG_Driver().
|
extern |
Definition at line 41 of file pngdriver/draw.c.
References path_stroke(), and png_draw_line().
Referenced by PNG_Driver().
|
extern |
Definition at line 79 of file pngdriver/read_bmp.c.
References b, png_state::file_name, g, G_fatal_error(), png_state::grid, HEADER_SIZE, png_state::height, png, png_get_color(), r, png_state::true_color, png_state::width, and x.
Referenced by read_image().
|
extern |
Definition at line 22 of file pngdriver/read.c.
References png_state::file_name, G_fatal_error(), G_strcasecmp(), png_state::has_alpha, png_state::modified, png, read_bmp(), read_pgm(), read_png(), and read_ppm().
Referenced by PNG_Graph_set().
|
extern |
Definition at line 68 of file pngdriver/read_ppm.c.
References png_state::file_name, G_fatal_error(), G_free(), G_store(), png_state::grid, png_state::height, png, png_get_color(), png_state::true_color, png_state::width, and x.
Referenced by read_image().
|
extern |
Definition at line 45 of file read_png.c.
References b, png_state::file_name, g, G_fatal_error(), G_free(), png_state::grid, png_state::has_alpha, png_state::height, NULL, png_state::palette, png, png_get_color(), r, png_state::true_color, png_state::width, and x.
Referenced by read_image().
|
extern |
Definition at line 21 of file pngdriver/read_ppm.c.
References b, png_state::file_name, g, G_fatal_error(), png_state::grid, png_state::height, png, png_get_color(), r, png_state::true_color, png_state::width, and x.
Referenced by read_image().
|
extern |
Definition at line 63 of file pngdriver/write_bmp.c.
References b, png_state::file_name, g, G_fatal_error(), png_state::grid, HEADER_SIZE, png_state::height, output(), png, png_get_pixel(), r, png_state::width, and x.
Referenced by write_image().
|
extern |
Definition at line 22 of file pngdriver/write.c.
References png_state::file_name, G_fatal_error(), G_strcasecmp(), png_state::has_alpha, png_state::mapped, png_state::modified, png, write_bmp(), write_pgm(), write_png(), and write_ppm().
Referenced by PNG_Graph_close(), and PNG_Graph_set().
|
extern |
Definition at line 49 of file pngdriver/write_ppm.c.
References b, png_state::file_name, g, G_fatal_error(), G_free(), G_store(), png_state::grid, png_state::height, output(), png, png_get_pixel(), r, png_state::width, and x.
Referenced by write_image().
|
extern |
Definition at line 55 of file write_png.c.
References b, png_state::file_name, g, G_fatal_error(), G_free(), png_state::grid, png_state::has_alpha, png_state::height, NULL, output(), png_state::palette, png, png_get_pixel(), r, png_state::true_color, png_state::width, and x.
Referenced by write_image().
|
extern |
Definition at line 21 of file pngdriver/write_ppm.c.
References b, png_state::file_name, g, G_fatal_error(), png_state::grid, png_state::height, output(), png, png_get_pixel(), r, png_state::width, and x.
Referenced by write_image().
|
extern |
Definition at line 32 of file pngdriver/graph_set.c.
Referenced by PNG_Box(), PNG_color_rgb(), PNG_draw_bitmap(), png_draw_line(), PNG_draw_point(), PNG_Erase(), png_get_color(), png_get_pixel(), PNG_Graph_close(), PNG_Graph_get_file(), PNG_Graph_set(), png_init_color_table(), PNG_Line_width(), png_polygon(), PNG_raster(), PNG_Set_window(), read_bmp(), read_image(), read_pgm(), read_png(), read_ppm(), write_bmp(), write_image(), write_pgm(), write_png(), and write_ppm().