GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cairodriver.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <grass/config.h>
#include <grass/gis.h>
#include "driver.h"
Include dependency graph for cairodriver.h:
This graph shows which files directly or indirectly include this file:

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 driverCairo_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
 

Macro Definition Documentation

#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().

Function Documentation

void Cairo_begin_scaled_raster ( int  ,
int  [2][2],
int  [2][2] 
)

Definition at line 12 of file cairodriver/Raster.c.

References G_debug(), and G_fatal_error().

Referenced by Cairo_Driver().

void Cairo_Box_abs ( int  ,
int  ,
int  ,
int   
)

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().

void Cairo_draw_bitmap ( int  ncols,
int  nrows,
int  threshold,
const unsigned char *  buf 
)

Draw bitmap.

Parameters
ncols,nrowsnumber of columns and rows
thresholdthreshold value
bufdata 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().

void Cairo_draw_line ( int  ,
int  ,
int  ,
int   
)

Definition at line 3 of file cairodriver/Draw_line.c.

References cairo, G_debug(), and modified.

Referenced by Cairo_Driver().

void Cairo_draw_point ( int  ,
int   
)

Definition at line 6 of file cairodriver/Draw_point.c.

References cairo, G_debug(), HALFPOINTSIZE, modified, and POINTSIZE.

Referenced by Cairo_Driver().

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().

int Cairo_Graph_set ( int  ,
char **   
)
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().

int Cairo_lookup_color ( int  ,
int  ,
int   
)

Definition at line 25 of file cairodriver/Color.c.

References G_debug().

Referenced by Cairo_Driver().

void Cairo_Polygon_abs ( const int ,
const int ,
int   
)

Definition at line 12 of file Poly.c.

References cairo, do_polygon(), and G_debug().

Referenced by Cairo_Driver().

void Cairo_Polyline_abs ( const int ,
const int ,
int   
)

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().

void Cairo_Set_window ( int  ,
int  ,
int  ,
int   
)

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_ppm ( void  )

Definition at line 3 of file cairodriver/write_ppm.c.

Referenced by write_image().

Variable Documentation

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().

int clip_bottom
int clip_right
int file_type

Definition at line 47 of file cairodriver/Graph.c.

Referenced by find_datah(), gvl_file_newh(), read_image(), and write_image().

int mapped

Definition at line 53 of file cairodriver/Graph.c.

Referenced by PNG_Graph_close(), PNG_Graph_set(), 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.