15 #ifndef __CAIRODRIVER_H__
16 #define __CAIRODRIVER_H__
26 #if !defined(USE_X11) || !CAIRO_HAS_XLIB_SURFACE || \
27 CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 6, 0)
28 #undef CAIRO_HAS_XLIB_XRENDER_SURFACE
29 #define CAIRO_HAS_XLIB_XRENDER_SURFACE 0
32 #if CAIRO_HAS_XLIB_XRENDER_SURFACE
35 #include <X11/Xutil.h>
36 #include <X11/extensions/Xrender.h>
44 #define DEFAULT_FILE_NAME "map.png"
46 #define HEADER_SIZE 64
49 #define COLORSCALE (1.0 / 255.0)
50 #define CAIROCOLOR(a) (((double)(a)) * COLORSCALE)
53 #define FTYPE_UNKNOWN 0
62 extern cairo_surface_t *
surface;
63 extern cairo_t *
cairo;
73 #if CAIRO_HAS_XLIB_XRENDER_SURFACE
77 XRenderPictFormat *format;
90 extern void Cairo_Box(
double,
double,
double,
double);
92 extern void Cairo_Bitmap(
int,
int,
int,
const unsigned char *);
96 extern int Cairo_raster(
int,
int,
const unsigned char *,
const unsigned char *,
97 const unsigned char *,
const unsigned char *);
108 extern void Cairo_text_box(
const char *,
double *,
double *,
double *,
void Cairo_Point(double, double)
void Cairo_Color(int, int, int)
Set source color (opaque)
void cairo_write_ppm(void)
void cairo_write_bmp(void)
const struct driver * Cairo_Driver(void)
Initialize display driver.
void Cairo_Erase(void)
Erase screen.
void Cairo_Move(double, double)
int Cairo_raster(int, int, const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
Draw raster row.
void cairo_read_bmp(void)
void cairo_read_xid(void)
void cairo_read_image(void)
void Cairo_font_info(char ***, int *)
Get fonts into.
void Cairo_Line_width(double)
Set line width.
void Cairo_font_list(char ***, int *)
Get list of fonts.
cairo_surface_t * surface
void Cairo_Cont(double, double)
void cairo_write_image(void)
void Cairo_end_raster(void)
Finish drawing raster.
void Cairo_Box(double, double, double, double)
Draw a (filled) rectangle.
const char * Cairo_Graph_get_file(void)
Get render file.
void Cairo_set_font(const char *)
Set font.
int Cairo_Graph_set(void)
Initialize driver.
void cairo_write_xid(void)
void Cairo_Client_Close(void)
void Cairo_Graph_close(void)
Close driver.
void Cairo_Text(const char *)
Draw text.
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.
void Cairo_Set_window(double, double, double, double)
Set window.
void cairo_read_ppm(void)
void Cairo_text_box(const char *, double *, double *, double *, double *)