static cairo_status_t
writer (void *closure, const unsigned char *data, unsigned int length)
{
- if (length == gvwrite((GVJ_t *)closure, (const char*)data, length))
+ if (length == gvwrite(closure, (const char*)data, length))
return CAIRO_STATUS_SUCCESS;
return CAIRO_STATUS_WRITE_ERROR;
}
static void cairogen_begin_job(GVJ_t * job)
{
if (job->external_context && job->context)
- cairo_save((cairo_t *) job->context);
+ cairo_save(job->context);
}
static void cairogen_end_job(GVJ_t * job)
{
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
if (job->external_context)
cairo_restore(cr);
static void cairogen_begin_page(GVJ_t * job)
{
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
cairo_surface_t *surface;
cairo_status_t status;
}
cr = cairo_create(surface);
cairo_surface_destroy (surface);
- job->context = (void *) cr;
+ job->context = cr;
}
cairo_scale(cr, job->scale.x, job->scale.y);
static void cairogen_end_page(GVJ_t * job)
{
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
cairo_surface_t *surface;
cairo_status_t status;
static void cairogen_begin_anchor(GVJ_t *job, char *url, char *tooltip, char *target, char *id)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
double p0x, p0y, p1x, p1y;
char *buf;
size_t buf_len;
static void cairogen_textspan(GVJ_t * job, pointf p, textspan_t * span)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
pointf A[2];
cairo_set_dash (cr, dashed, 0, 0.0); /* clear any dashing */
static void cairogen_ellipse(GVJ_t * job, pointf * A, int filled)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
cairo_matrix_t matrix;
double rx, ry;
cairogen_polygon(GVJ_t * job, pointf * A, int n, int filled)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
int i;
cairogen_set_penstyle(job, cr);
int arrow_at_end, int filled)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
int i;
cairogen_set_penstyle(job, cr);
cairogen_polyline(GVJ_t * job, pointf * A, int n)
{
obj_state_t *obj = job->obj;
- cairo_t *cr = (cairo_t *) job->context;
+ cairo_t *cr = job->context;
int i;
cairogen_set_penstyle(job, cr);