/* create a freetype glyph string */
gfx_string gfx_string_create(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
FT_Face face,
const char *text,
int rotation,
static
gfx_node_t *gfx_new_node(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
enum gfx_en type)
{
gfx_node_t *node = art_new(gfx_node_t, 1);
/* create a new line */
gfx_node_t *gfx_new_line(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double X0,
double Y0,
double X1,
}
gfx_node_t *gfx_new_dashed_line(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double X0,
double Y0,
double X1,
/* create a new area */
gfx_node_t *gfx_new_area(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double X0,
double Y0,
double X1,
/* add a point to a line or to an area */
int gfx_add_point(
- gfx_node_t * node,
+ gfx_node_t *node,
double x,
double y)
{
}
void gfx_close_path(
- gfx_node_t * node)
+ gfx_node_t *node)
{
node->closed_path = 1;
if (node->path[0].code == ART_MOVETO_OPEN)
/* create a text node */
gfx_node_t *gfx_new_text(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double x,
double y,
gfx_color_t color,
}
int gfx_render(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
art_u32 width,
art_u32 height,
gfx_color_t background,
double gfx_get_text_width(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double start,
char *font,
double size,
}
double gfx_get_text_width_libart(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
double UNUSED(start),
char *font,
double size,
}
static void gfx_libart_close_path(
- gfx_node_t * node,
+ gfx_node_t *node,
ArtVpath ** vec)
{
/* libart must have end==start for closed paths,
/* create a free type glyph string */
gfx_string gfx_string_create(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
FT_Face face,
const char *text,
int rotation,
/* render grafics into png image */
int gfx_render_png(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
art_u32 width,
art_u32 height,
gfx_color_t background,
/* free memory used by nodes this will also remove memory required for
associated paths and svcs ... but not for text strings */
int gfx_destroy(
- gfx_canvas_t * canvas)
+ gfx_canvas_t *canvas)
{
gfx_node_t *next, *node = canvas->firstnode;
#if PDF_CALC_DEBUG
static void pdf_dump_calc(
- gfx_node_t * node,
+ gfx_node_t *node,
pdf_coords * g)
{
fprintf(stderr, "PDF CALC =============================\n");
static void pdf_rotate(
pdf_coords * g,
- pdf_point * p)
+ pdf_point *p)
{
double x2 = g->cos_r * p->x - g->sin_r * p->y;
double y2 = g->sin_r * p->x + g->cos_r * p->y;
static void pdf_calc(
int page_height,
- gfx_node_t * node,
+ gfx_node_t *node,
pdf_coords * g)
{
pdf_point a, b, c;
}
static void svg_get_dash(
- gfx_node_t * node,
- svg_dash * d)
+ gfx_node_t *node,
+ svg_dash *d)
{
double offset;
int mult;
}
static int svg_dash_equal(
- svg_dash * a,
- svg_dash * b)
+ svg_dash *a,
+ svg_dash *b)
{
if (a->dash_enable != b->dash_enable)
return 0;
static void svg_common_path_attributes(
FILE * fp,
- gfx_node_t * node)
+ gfx_node_t *node)
{
svg_dash dash_info;
double lastA,
double currentA,
double currentB,
- gfx_node_t * node,
+ gfx_node_t *node,
int segment_idx,
int isx,
char absChar,
static void svg_path(
FILE * fp,
- gfx_node_t * node,
+ gfx_node_t *node,
int multi)
{
int i;
static void svg_multi_path(
FILE * fp,
- gfx_node_t ** nodeR)
+ gfx_node_t **nodeR)
{
/* optimize for multiple paths with the same color, penwidth, etc. */
int num = 1;
static void svg_area(
FILE * fp,
- gfx_node_t * node)
+ gfx_node_t *node)
{
int i;
double startX = 0, startY = 0;
static void svg_text(
FILE * fp,
- gfx_node_t * node)
+ gfx_node_t *node)
{
pdf_coords g;
const char *fontname;
}
int gfx_render_svg(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
art_u32 width,
art_u32 height,
gfx_color_t background,
} eps_state;
static void eps_set_color(
- eps_state * state,
+ eps_state *state,
gfx_color_t color)
{
#if USE_EPS_FAKE_ALPHA
}
static int eps_add_font(
- eps_state * state,
- gfx_node_t * node)
+ eps_state *state,
+ gfx_node_t *node)
{
/* The fonts list could be postponed to the end using
(atend), but let's be nice and have them in the header. */
}
static void eps_list_fonts(
- eps_state * state,
+ eps_state *state,
const char *dscName)
{
eps_font *ef;
}
static void eps_define_fonts(
- eps_state * state)
+ eps_state *state)
{
eps_font *ef;
}
static int eps_prologue(
- eps_state * state)
+ eps_state *state)
{
gfx_node_t *node;
}
static void eps_clear_dash(
- eps_state * state)
+ eps_state *state)
{
if (!state->has_dash)
return;
}
static void eps_write_linearea(
- eps_state * state,
- gfx_node_t * node)
+ eps_state *state,
+ gfx_node_t *node)
{
int i;
FILE *fp = state->fp;
}
static void eps_write_text(
- eps_state * state,
- gfx_node_t * node)
+ eps_state *state,
+ gfx_node_t *node)
{
FILE *fp = state->fp;
const char *ps_font = afm_get_font_postscript_name(node->filename);
}
static int eps_write_content(
- eps_state * state)
+ eps_state *state)
{
gfx_node_t *node;
}
int gfx_render_eps(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
art_u32 width,
art_u32 height,
gfx_color_t background,
} pdf_state;
static void pdf_init_buffer(
- pdf_state * state,
- pdf_buffer * buf)
+ pdf_state *state,
+ pdf_buffer *buf)
{
int initial_size = 32;
}
static void pdf_put(
- pdf_buffer * buf,
+ pdf_buffer *buf,
const char *text,
int len)
{
}
static void pdf_put_char(
- pdf_buffer * buf,
+ pdf_buffer *buf,
char c)
{
if (buf->alloc_size >= buf->current_size + 1) {
}
static void pdf_puts(
- pdf_buffer * buf,
+ pdf_buffer *buf,
const char *text)
{
pdf_put(buf, text, strlen(text));
}
static void pdf_indent(
- pdf_buffer * buf)
+ pdf_buffer *buf)
{
pdf_puts(buf, "\t");
}
static void pdf_putsi(
- pdf_buffer * buf,
+ pdf_buffer *buf,
const char *text)
{
pdf_indent(buf);
}
static void pdf_putint(
- pdf_buffer * buf,
+ pdf_buffer *buf,
int i)
{
char tmp[20];
}
static void pdf_putnumber(
- pdf_buffer * buf,
+ pdf_buffer *buf,
double d)
{
char tmp[50];
}
static void pdf_put_string_contents_wide(
- pdf_buffer * buf,
+ pdf_buffer *buf,
const afm_char * text)
{
const afm_char *p = text;
}
static void pdf_put_string_contents(
- pdf_buffer * buf,
+ pdf_buffer *buf,
const char *text)
{
#ifdef HAVE_MBSTOWCS
}
static void pdf_init_object(
- pdf_state * state,
- pdf_buffer * buf)
+ pdf_state *state,
+ pdf_buffer *buf)
{
pdf_init_buffer(state, buf);
buf->id = ++state->last_obj_id;
}
static void pdf_init_dict(
- pdf_state * state,
- pdf_buffer * buf)
+ pdf_state *state,
+ pdf_buffer *buf)
{
pdf_init_object(state, buf);
buf->is_dict = 1;
}
static void pdf_set_color(
- pdf_buffer * buf,
+ pdf_buffer *buf,
gfx_color_t color,
- gfx_color_t * current_color,
+ gfx_color_t *current_color,
const char *op)
{
#if USE_PDF_FAKE_ALPHA
}
static void pdf_set_stroke_color(
- pdf_buffer * buf,
+ pdf_buffer *buf,
gfx_color_t color)
{
pdf_set_color(buf, color, &buf->state->stroke_color, "RG");
}
static void pdf_set_fill_color(
- pdf_buffer * buf,
+ pdf_buffer *buf,
gfx_color_t color)
{
pdf_set_color(buf, color, &buf->state->fill_color, "rg");
}
static pdf_font *pdf_find_font(
- pdf_state * state,
- gfx_node_t * node)
+ pdf_state *state,
+ gfx_node_t *node)
{
const char *ps_font = afm_get_font_postscript_name(node->filename);
pdf_font *ef;
}
static void pdf_add_font(
- pdf_state * state,
- gfx_node_t * node)
+ pdf_state *state,
+ gfx_node_t *node)
{
pdf_font *ef = pdf_find_font(state, node);
}
static void pdf_create_fonts(
- pdf_state * state)
+ pdf_state *state)
{
gfx_node_t *node;
}
static void pdf_write_linearea(
- pdf_state * state,
- gfx_node_t * node)
+ pdf_state *state,
+ gfx_node_t *node)
{
int i;
pdf_buffer *s = &state->graph_stream;
static void pdf_write_matrix(
- pdf_state * state,
- gfx_node_t * node,
+ pdf_state *state,
+ gfx_node_t *node,
pdf_coords * g,
int useTM)
{
}
static void pdf_write_text(
- pdf_state * state,
- gfx_node_t * node,
+ pdf_state *state,
+ gfx_node_t *node,
int last_was_text,
int next_is_text)
{
}
static void pdf_write_content(
- pdf_state * state)
+ pdf_state *state)
{
gfx_node_t *node;
int last_was_text = 0, next_is_text;
}
static void pdf_init_document(
- pdf_state * state)
+ pdf_state *state)
{
pdf_init_buffer(state, &state->pdf_header);
pdf_init_dict(state, &state->catalog_obj);
}
static void pdf_setup_document(
- pdf_state * state)
+ pdf_state *state)
{
const char *creator =
"RRDtool " PACKAGE_VERSION " Tobias Oetiker, http://tobi.oetiker.ch";
}
static void pdf_write_string_to_file(
- pdf_state * state,
+ pdf_state *state,
const char *text)
{
fputs(text, state->fp);
}
static void pdf_write_buf_to_file(
- pdf_state * state,
- pdf_buffer * buf)
+ pdf_state *state,
+ pdf_buffer *buf)
{
char tmp[40];
}
static void pdf_write_to_file(
- pdf_state * state)
+ pdf_state *state)
{
pdf_buffer *buf = state->first_buffer;
int xref_pos;
}
static void pdf_free_resources(
- pdf_state * state)
+ pdf_state *state)
{
pdf_buffer *buf = state->first_buffer;
}
int gfx_render_pdf(
- gfx_canvas_t * canvas,
+ gfx_canvas_t *canvas,
art_u32 width,
art_u32 height,
gfx_color_t UNUSED(background),