GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <grass/config.h>
#include <grass/gis.h>
#include "driver.h"
Go to the source code of this file.
Macros | |
#define | DEFAULT_FILE_NAME "map.png" |
#define | HEADER_SIZE 64 |
#define | COLORSCALE (1.0/255.0) |
#define | CAIROCOLOR(a) (((double)(a))*COLORSCALE) |
#define | FTYPE_UNKNOWN 0 |
#define | FTYPE_PPM 1 |
#define | FTYPE_BMP 2 |
#define | FTYPE_PNG 3 |
#define | FTYPE_PDF 4 |
#define | FTYPE_PS 5 |
#define | FTYPE_SVG 6 |
#define | FTYPE_X11 7 |
Functions | |
struct driver * | Cairo_Driver (void) |
void | Cairo_Client_Close (void) |
int | Cairo_Graph_set (int, char **) |
void | Cairo_Graph_close (void) |
void | Cairo_Box_abs (int, int, int, int) |
void | Cairo_Set_window (int, int, int, int) |
void | Cairo_draw_line (int, int, int, int) |
void | Cairo_draw_bitmap (int, int, int, const unsigned char *) |
Draw bitmap. More... | |
void | Cairo_draw_point (int, int) |
void | Cairo_color (int) |
int | Cairo_lookup_color (int, int, int) |
void | Cairo_Erase (void) |
void | Cairo_begin_scaled_raster (int, int[2][2], int[2][2]) |
int | Cairo_scaled_raster (int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *) |
void | Cairo_end_scaled_raster (void) |
void | Cairo_Line_width (int) |
void | Cairo_Polygon_abs (const int *, const int *, int) |
void | Cairo_Polyline_abs (const int *, const int *, int) |
void | Cairo_Respond (void) |
void | read_image (void) |
void | read_ppm (void) |
void | read_bmp (void) |
void | write_image (void) |
void | write_ppm (void) |
void | write_bmp (void) |
Variables | |
cairo_surface_t * | surface |
cairo_t * | cairo |
char * | file_name |
int | file_type |
int | width |
int | height |
int | stride |
unsigned char * | grid |
int | clip_left |
int | clip_right |
int | clip_top |
int | clip_bottom |
int | auto_write |
double | bgcolor_r |
double | bgcolor_g |
double | bgcolor_b |
double | bgcolor_a |
int | modified |
int | mapped |
#define CAIROCOLOR | ( | a | ) | (((double)(a))*COLORSCALE) |
Definition at line 21 of file cairodriver.h.
Referenced by Cairo_color(), and Cairo_Graph_set().
#define COLORSCALE (1.0/255.0) |
Definition at line 20 of file cairodriver.h.
#define DEFAULT_FILE_NAME "map.png" |
Definition at line 15 of file cairodriver.h.
#define FTYPE_BMP 2 |
Definition at line 26 of file cairodriver.h.
Referenced by read_image(), and write_image().
#define FTYPE_PDF 4 |
Definition at line 28 of file cairodriver.h.
#define FTYPE_PNG 3 |
Definition at line 27 of file cairodriver.h.
Referenced by read_image(), and write_image().
#define FTYPE_PPM 1 |
Definition at line 25 of file cairodriver.h.
Referenced by read_image(), and write_image().
#define FTYPE_PS 5 |
Definition at line 29 of file cairodriver.h.
#define FTYPE_SVG 6 |
Definition at line 30 of file cairodriver.h.
#define FTYPE_UNKNOWN 0 |
Definition at line 24 of file cairodriver.h.
#define FTYPE_X11 7 |
Definition at line 31 of file cairodriver.h.
Referenced by write_image().
#define HEADER_SIZE 64 |
Definition at line 17 of file cairodriver.h.
Referenced by read_bmp(), and write_bmp().
Definition at line 12 of file cairodriver/Raster.c.
References G_debug(), and G_fatal_error().
Referenced by Cairo_Driver().
Definition at line 5 of file cairodriver/Box.c.
References cairo, G_debug(), and modified.
Referenced by Cairo_Driver().
void Cairo_Client_Close | ( | void | ) |
Definition at line 3 of file cairodriver/Client.c.
References auto_write, G_debug(), and write_image().
Referenced by Cairo_Driver().
void Cairo_color | ( | int | ) |
Definition at line 7 of file cairodriver/Color.c.
References b, cairo, CAIROCOLOR, tools::color, g, G_debug(), previous_color, and r.
Referenced by Cairo_Driver().
Draw bitmap.
ncols,nrows | number of columns and rows |
threshold | threshold value |
buf | data buffer |
Definition at line 26 of file cairodriver/Draw_bitmap.c.
References cairo, cur_x, cur_y, menudata::data, G_debug(), G_fatal_error(), malloc(), modified, and stride.
Referenced by Cairo_Driver().
Definition at line 3 of file cairodriver/Draw_line.c.
References cairo, G_debug(), and modified.
Referenced by Cairo_Driver().
Definition at line 6 of file cairodriver/Draw_point.c.
References cairo, G_debug(), HALFPOINTSIZE, modified, and POINTSIZE.
Referenced by Cairo_Driver().
struct driver* Cairo_Driver | ( | void | ) |
Definition at line 22 of file cairodriver/Driver.c.
References driver::Begin_scaled_raster, driver::Box_abs, driver::Box_rel, Cairo_begin_scaled_raster(), Cairo_Box_abs(), Cairo_Client_Close(), Cairo_color(), Cairo_draw_bitmap(), Cairo_draw_line(), Cairo_draw_point(), Cairo_end_scaled_raster(), Cairo_Erase(), Cairo_Graph_close(), Cairo_Graph_set(), Cairo_Line_width(), Cairo_lookup_color(), Cairo_Polygon_abs(), Cairo_Polyline_abs(), Cairo_Respond(), Cairo_scaled_raster(), Cairo_Set_window(), driver::Client_Close, driver::Client_Open, driver::color, driver::Do_work, driver::draw_bitmap, driver::draw_line, driver::draw_point, driver::draw_text, driver::End_scaled_raster, driver::Erase, driver::Get_with_box, driver::Get_with_line, driver::Get_with_pointer, driver::Graph_close, driver::Graph_set, driver::Line_width, driver::lookup_color, NULL, driver::Panel_delete, driver::Panel_restore, driver::Panel_save, driver::Polydots_abs, driver::Polydots_rel, driver::Polygon_abs, driver::Polygon_rel, driver::Polyline_abs, driver::Polyline_rel, driver::Respond, driver::Scaled_raster, driver::Set_window, and driver::Work_stream.
void Cairo_end_scaled_raster | ( | void | ) |
Definition at line 76 of file cairodriver/Raster.c.
References cairo, G_debug(), and modified.
Referenced by Cairo_Driver().
void Cairo_Erase | ( | void | ) |
Definition at line 3 of file cairodriver/Erase.c.
References bgcolor_a, bgcolor_b, bgcolor_g, bgcolor_r, cairo, G_debug(), and modified.
Referenced by Cairo_Driver().
void Cairo_Graph_close | ( | void | ) |
Definition at line 258 of file cairodriver/Graph.c.
References cairo, G_debug(), NULL, tools::surface, and write_image().
Referenced by Cairo_Driver().
Definition at line 217 of file cairodriver/Graph.c.
References auto_write, bgcolor_a, bgcolor_b, bgcolor_g, bgcolor_r, CAIROCOLOR, G_debug(), G_fatal_error(), and getenv().
Referenced by Cairo_Driver().
void Cairo_Line_width | ( | int | ) |
Definition at line 11 of file cairodriver/Line_width.c.
References cairo, G_debug(), MAX, and MIN_WIDTH.
Referenced by Cairo_Driver().
Definition at line 25 of file cairodriver/Color.c.
References G_debug().
Referenced by Cairo_Driver().
Definition at line 12 of file Poly.c.
References cairo, do_polygon(), and G_debug().
Referenced by Cairo_Driver().
Definition at line 19 of file Poly.c.
References cairo, do_polygon(), and G_debug().
Referenced by Cairo_Driver().
void Cairo_Respond | ( | void | ) |
Definition at line 4 of file cairodriver/Respond.c.
References auto_write, and write_image().
Referenced by Cairo_Driver().
int Cairo_scaled_raster | ( | int | , |
int | , | ||
const unsigned char * | , | ||
const unsigned char * | , | ||
const unsigned char * | , | ||
const unsigned char * | |||
) |
Definition at line 50 of file cairodriver/Raster.c.
References b, g, G_debug(), n, and r.
Referenced by Cairo_Driver().
Definition at line 3 of file cairodriver/Set_window.c.
References cairo, and G_debug().
Referenced by Cairo_Driver().
void read_bmp | ( | void | ) |
Definition at line 67 of file cairodriver/read_bmp.c.
Referenced by read_image().
void read_image | ( | void | ) |
Definition at line 3 of file cairodriver/read.c.
Referenced by PNG_Graph_set().
void read_ppm | ( | void | ) |
Definition at line 3 of file cairodriver/read_ppm.c.
Referenced by read_image().
void write_bmp | ( | void | ) |
Definition at line 51 of file cairodriver/write_bmp.c.
Referenced by write_image().
void write_image | ( | void | ) |
Definition at line 8 of file cairodriver/write.c.
Referenced by Cairo_Client_Close(), Cairo_Graph_close(), Cairo_Respond(), PNG_Client_Close(), PNG_Graph_close(), PNG_Graph_set(), and PNG_Respond().
void write_ppm | ( | void | ) |
Definition at line 3 of file cairodriver/write_ppm.c.
Referenced by write_image().
int auto_write |
Definition at line 44 of file cairodriver.h.
Referenced by Cairo_Client_Close(), Cairo_Graph_set(), Cairo_Respond(), PNG_Client_Close(), PNG_Graph_set(), and PNG_Respond().
double bgcolor_a |
Definition at line 56 of file cairodriver/Graph.c.
Referenced by Cairo_Erase(), and Cairo_Graph_set().
double bgcolor_b |
Definition at line 56 of file cairodriver/Graph.c.
Referenced by Cairo_Erase(), and Cairo_Graph_set().
double bgcolor_g |
Definition at line 56 of file cairodriver/Graph.c.
Referenced by Cairo_Erase(), and Cairo_Graph_set().
double bgcolor_r |
Definition at line 56 of file cairodriver/Graph.c.
Referenced by Cairo_Erase(), and Cairo_Graph_set().
cairo_t* cairo |
Definition at line 60 of file cairodriver/Graph.c.
Referenced by Cairo_Box_abs(), Cairo_color(), Cairo_draw_bitmap(), Cairo_draw_line(), Cairo_draw_point(), Cairo_end_scaled_raster(), Cairo_Erase(), Cairo_Graph_close(), Cairo_Line_width(), Cairo_Polygon_abs(), Cairo_Polyline_abs(), Cairo_Set_window(), do_polygon(), read_image(), and write_image().
int clip_bottom |
int clip_left |
Definition at line 33 of file pngdriver/Graph_set.c.
Referenced by PNG_Box_abs(), PNG_draw_bitmap(), PNG_Graph_set(), PNG_scaled_raster(), and PNG_Set_window().
int clip_right |
int clip_top |
Definition at line 33 of file pngdriver/Graph_set.c.
Referenced by PNG_Box_abs(), PNG_draw_bitmap(), PNG_Graph_set(), PNG_scaled_raster(), and PNG_Set_window().
char* file_name |
Definition at line 46 of file cairodriver/Graph.c.
Referenced by find_datah(), G_vasprintf(), PNG_Graph_set(), PS_Graph_set(), read_bmp(), read_image(), read_pgm(), read_png(), read_ppm(), write_bmp(), write_image(), write_pgm(), write_png(), and write_ppm().
int file_type |
Definition at line 47 of file cairodriver/Graph.c.
Referenced by find_datah(), gvl_file_newh(), read_image(), and write_image().
unsigned char* grid |
Definition at line 50 of file cairodriver/Graph.c.
Referenced by G_get_raster_sample_bilinear(), G_get_raster_sample_cubic(), PNG_Box_abs(), PNG_draw_bitmap(), PNG_draw_point(), PNG_Erase(), PNG_Graph_close(), PNG_Graph_set(), PNG_scaled_raster(), read_bmp(), read_pgm(), read_png(), read_ppm(), write_bmp(), write_pgm(), write_png(), and write_ppm().
int height |
Definition at line 49 of file cairodriver/Graph.c.
Referenced by avl_copy(), D_popup(), gsd_get_txtheight(), Nviz_set_viewpoint_height(), PNG_Box_abs(), PNG_Erase(), PNG_Graph_set(), PS_Graph_set(), read_bmp(), read_pgm(), read_png(), read_ppm(), write_bmp(), write_pgm(), write_png(), write_ppm(), and write_setup().
int mapped |
Definition at line 53 of file cairodriver/Graph.c.
Referenced by PNG_Graph_close(), PNG_Graph_set(), and write_image().
int modified |
Definition at line 51 of file cairodriver/Graph.c.
Referenced by Cairo_Box_abs(), Cairo_draw_bitmap(), Cairo_draw_line(), Cairo_draw_point(), Cairo_end_scaled_raster(), Cairo_Erase(), PNG_Box_abs(), PNG_draw_bitmap(), PNG_draw_line(), PNG_draw_point(), PNG_Erase(), PNG_Graph_set(), PNG_scaled_raster(), read_image(), and write_image().
int stride |
Definition at line 49 of file cairodriver/Graph.c.
Referenced by Cairo_draw_bitmap(), read_bmp(), read_ppm(), write_bmp(), and write_ppm().
cairo_surface_t* surface |
Definition at line 1397 of file tools.py.
Referenced by Cairo_Graph_close(), read_image(), and write_image().
int width |
Definition at line 2959 of file psmap/dialogs.py.