15 #ifndef __CAIRODRIVER_H__ 16 #define __CAIRODRIVER_H__ 26 #if !defined(USE_X11) || !CAIRO_HAS_XLIB_SURFACE || CAIRO_VERSION < CAIRO_VERSION_ENCODE(1,6,0) 27 #undef CAIRO_HAS_XLIB_XRENDER_SURFACE 28 #define CAIRO_HAS_XLIB_XRENDER_SURFACE 0 31 #if CAIRO_HAS_XLIB_XRENDER_SURFACE 34 #include <X11/Xutil.h> 35 #include <X11/extensions/Xrender.h> 43 #define DEFAULT_FILE_NAME "map.png" 45 #define HEADER_SIZE 64 48 #define COLORSCALE (1.0/255.0) 49 #define CAIROCOLOR(a) (((double)(a))*COLORSCALE) 52 #define FTYPE_UNKNOWN 0 61 extern cairo_surface_t *
surface;
62 extern cairo_t *
cairo;
72 #if CAIRO_HAS_XLIB_XRENDER_SURFACE 76 XRenderPictFormat *format;
89 extern void Cairo_Box(
double,
double,
double,
double);
91 extern void Cairo_Bitmap(
int,
int,
int,
const unsigned char *);
96 const unsigned char *,
const unsigned char *,
97 const unsigned char *,
const unsigned char *);
108 extern void Cairo_text_box(
const char *,
double *,
double *,
double *,
double *);
void cairo_read_xid(void)
void Cairo_Color(int, int, int)
Set source color (opaque)
void Cairo_begin_raster(int, int[2][2], double[2][2])
Start drawing raster.
void Cairo_Bitmap(int, int, int, const unsigned char *)
Draw bitmap.
const char * Cairo_Graph_get_file(void)
Get render file.
void cairo_read_ppm(void)
void Cairo_Graph_close(void)
Close driver.
void Cairo_Text(const char *)
Draw text.
void Cairo_Set_window(double, double, double, double)
Set window.
int Cairo_Graph_set(void)
Initialize driver.
void Cairo_font_info(char ***, int *)
Get fonts into.
void Cairo_set_font(const char *)
Set font.
void Cairo_Client_Close(void)
void cairo_write_ppm(void)
void cairo_write_bmp(void)
int Cairo_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
void cairo_write_image(void)
void cairo_read_bmp(void)
const struct driver * Cairo_Driver(void)
Initialize display driver.
void Cairo_font_list(char ***, int *)
Get list of fonts.
void Cairo_Line_width(double)
Set line width.
void cairo_read_image(void)
cairo_surface_t * surface
void Cairo_end_raster(void)
Finish drawing raster.
void Cairo_Move(double, double)
void cairo_write_xid(void)
void Cairo_Cont(double, double)
void Cairo_Box(double, double, double, double)
Draw a (filled) rectangle.
void Cairo_Erase(void)
Erase screen.
void Cairo_Point(double, double)
void Cairo_text_box(const char *, double *, double *, double *, double *)