#include <stdio.h>
#include <string.h>
#include <math.h>
#include <cairo.h>
#include <pango/pangocairo.h>
#include "plDevs.h"
#include "plplotP.h"
#include "drivers.h"
Go to the source code of this file.
Classes | |
struct | PLCairo |
Defines | |
#define | DPI 72 |
#define | PLCAIRO_DEFAULT_X 720 |
#define | PLCAIRO_DEFAULT_Y 540 |
#define | MAX_STRING_LEN 500 |
#define | MAX_MARKUP_LEN MAX_STRING_LEN * 10 |
#define | NPANGOLOOKUP 5 |
#define | FAMILY_LOOKUP_LEN 1024 |
#define | TAG_LEN 200 |
#define | RISE_FACTOR 0.8 |
Functions | |
PLCairo * | stream_and_font_setup (PLStream *, int) |
cairo_status_t | write_to_stream (void *, unsigned char *, unsigned int) |
void | set_clip (PLStream *pls) |
static void | proc_str (PLStream *, EscText *) |
static void | text_begin_cairo (PLStream *pls, EscText *args) |
static void | text_char_cairo (PLStream *pls, EscText *args) |
static void | text_esc_cairo (PLStream *pls, EscText *args) |
static void | text_end_cairo (PLStream *pls, EscText *args) |
static char * | ucs4_to_pango_markup_format (PLUNICODE *, int, float) |
static void | open_span_tag (char *, PLUNICODE, float, int) |
static void | close_span_tag (char *, int) |
static char * | rise_span_tag (int, float, float, float) |
static void | set_current_context (PLStream *) |
static void | poly_line (PLStream *, short *, short *, PLINT) |
static void | filled_polygon (PLStream *pls, short *xa, short *ya, PLINT npts) |
static void | gradient (PLStream *pls, short *xa, short *ya, PLINT npts) |
static void | arc (PLStream *, arc_struct *) |
static void | rotate_cairo_surface (PLStream *, float, float, float, float, float, float, PLBOOL) |
static void | start_raster (PLStream *) |
static void | end_raster (PLStream *) |
static void | set_mode (PLStream *, PLINT *) |
static void | get_mode (PLStream *, PLINT *) |
void | plD_bop_cairo (PLStream *) |
void | plD_eop_cairo (PLStream *) |
void | plD_state_cairo (PLStream *, PLINT) |
void | plD_esc_cairo (PLStream *, PLINT, void *) |
void | plD_tidy_cairo (PLStream *) |
void | plD_line_cairo (PLStream *, short, short, short, short) |
void | plD_polyline_cairo (PLStream *, short *, short *, PLINT) |
void | get_line_properties (PLCairo *aStream, cairo_line_join_t *join, cairo_line_cap_t *cap) |
void | set_line_properties (PLCairo *aStream, cairo_line_join_t join, cairo_line_cap_t cap) |
Variables | |
static int | text_clipping |
static int | text_anti_aliasing |
static int | graphics_anti_aliasing |
static int | external_drawable |
static int | rasterize_image |
static int | set_background |
static int | image_buffering |
static DrvOpt | cairo_options [] |
PLDLLIMPEXP_DRIVER const char * | plD_DEVICE_INFO_cairo |
const char * | defaultFamilyLookup [NPANGOLOOKUP] |
const char * | envFamilyLookup [NPANGOLOOKUP] |
char | familyLookup [NPANGOLOOKUP][FAMILY_LOOKUP_LEN] |
const char * | weightLookup [2] |
const char * | styleLookup [3] |
void arc | ( | PLStream * | pls, | |
arc_struct * | arc_info | |||
) | [static] |
void close_span_tag | ( | char * | pangoMarkupString, | |
int | upDown | |||
) | [static] |
void get_line_properties | ( | PLCairo * | aStream, | |
cairo_line_join_t * | join, | |||
cairo_line_cap_t * | cap | |||
) |
void open_span_tag | ( | char * | pangoMarkupString, | |
PLUNICODE | fci, | |||
float | fontSize, | |||
int | upDown | |||
) | [static] |
void plD_line_cairo | ( | PLStream * | pls, | |
short | x1a, | |||
short | y1a, | |||
short | x2a, | |||
short | y2a | |||
) |
char * rise_span_tag | ( | int | ifsuperscript, | |
float | fontSize, | |||
float | multiplier, | |||
float | rise | |||
) | [static] |
void set_line_properties | ( | PLCairo * | aStream, | |
cairo_line_join_t | join, | |||
cairo_line_cap_t | cap | |||
) |
char * ucs4_to_pango_markup_format | ( | PLUNICODE * | ucs4, | |
int | ucs4Len, | |||
float | fontSize | |||
) | [static] |
cairo_status_t write_to_stream | ( | void * | filePointer, | |
unsigned char * | data, | |||
unsigned int | length | |||
) |
DrvOpt cairo_options[] [static] |
{ { "text_clipping", DRV_INT, &text_clipping, "Use text clipping (text_clipping=0|1)" }, { "text_anti_aliasing", DRV_INT, &text_anti_aliasing, "Set desired text anti-aliasing (text_anti_aliasing=0|1|2|3). The numbers are in the same order as the cairo_antialias_t enumeration documented at http://cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t)" }, { "graphics_anti_aliasing", DRV_INT, &graphics_anti_aliasing, "Set desired graphics anti-aliasing (graphics_anti_aliasing=0|1|2|3). The numbers are in the same order as the cairo_antialias_t enumeration documented at http://cairographics.org/manual/cairo-cairo-t.html#cairo-antialias-t" }, { "external_drawable", DRV_INT, &external_drawable, "Plot to external X drawable" }, { "rasterize_image", DRV_INT, &rasterize_image, "Raster or vector image rendering (rasterize_image=0|1)" }, { "set_background", DRV_INT, &set_background, "Set the background for the extcairo device (set_background=0|1). If 1 then the plot background will set by PLplot" }, { "image_buffering", DRV_INT, &image_buffering, "Buffered offscreen rendering for the xcairo device (image_buffering=0|1)." }, { NULL, DRV_INT, NULL, NULL } }
const char* defaultFamilyLookup[NPANGOLOOKUP] |
const char* envFamilyLookup[NPANGOLOOKUP] |
int external_drawable [static] |
char familyLookup[NPANGOLOOKUP][FAMILY_LOOKUP_LEN] |
int graphics_anti_aliasing [static] |
int image_buffering [static] |
PLDLLIMPEXP_DRIVER const char* plD_DEVICE_INFO_cairo |
int rasterize_image [static] |
int set_background [static] |
const char* styleLookup[3] |
int text_anti_aliasing [static] |
int text_clipping [static] |
const char* weightLookup[2] |