#ifdef HAVE_LIBGD
#include "gd.h"
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char * s, unsigned int len);
-
int gvdevice_gd_putBuf (gdIOCtx *context, const void *buffer, int len)
{
- return gvdevice_write((GVJ_t *)(context->tell), buffer, (unsigned int)len);
+ return gvdevice_write((GVJ_t *)(context->tell), buffer, len);
}
/* used by gif output */
void gvdevice_gd_putC (gdIOCtx *context, int C)
{
- unsigned char c = C;
+ char c = C;
gvdevice_write((GVJ_t *)(context->tell), &c, 1);
}
* Does an in-place conversion of a CAIRO ARGB32 image to GDK RGBA
*/
static void
-argb2rgba ( unsigned int width, unsigned int height, unsigned char *data)
+argb2rgba ( unsigned int width, unsigned int height, char *data)
{
/* define indexes to color bytes in each format */
#define Ba 0
}
}
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char *s, unsigned int len);
-
static gboolean
writer ( const gchar *buf, gsize count, GError **error, gpointer data)
{
- if (count == gvdevice_write((GVJ_t *)data, (const unsigned char*)buf, count))
+ if (count == gvdevice_write((GVJ_t *)data, buf, count))
return TRUE;
return FALSE;
}
argb2rgba(job->width, job->height, job->imagedata);
pixbuf = gdk_pixbuf_new_from_data(
- job->imagedata, // data
+ (unsigned char*)(job->imagedata), // data
GDK_COLORSPACE_RGB, // colorspace
TRUE, // has_alpha
8, // bits_per_sample
#include "gvplugin_render.h"
+#include "gvplugin_device.h"
#include "ps.h"
#include "agxbuf.h"
#include "utils.h"
color->u.RGBA[2], color->u.RGBA[3]);
}
-extern size_t gvdevice_write(GVJ_t * job, const unsigned char *s, unsigned int len);
-
static cairo_status_t
writer (void *closure, const unsigned char *data, unsigned int length)
{
- if (length == gvdevice_write((GVJ_t *)closure, data, length))
+ if (length == gvdevice_write((GVJ_t *)closure, (const char*)data, length))
return CAIRO_STATUS_SUCCESS;
return CAIRO_STATUS_WRITE_ERROR;
}
case FORMAT_CAIRO:
default:
surface = cairo_get_target(cr);
- job->imagedata = cairo_image_surface_get_data(surface);
+ job->imagedata = (char *)(cairo_image_surface_get_data(surface));
break;
/* formatting will be done by gvdevice_format() */
}
**********************************************************/
#include "gvplugin.h"
+#include "gvplugin_device.h"
#include "gvplugin_quartz.h"
extern gvplugin_installed_t gvrender_quartz_types;
/* data consumer backed by the gvdevice */
-extern size_t gvdevice_write(GVJ_t *job, const unsigned char *s, unsigned int len);
-
static size_t device_data_consumer_put_bytes (void *info, const void *buffer, size_t count)
{
- return gvdevice_write((GVJ_t *)info, (const unsigned char*)buffer, count);
+ return gvdevice_write((GVJ_t *)info, (const char*)buffer, count);
}
CGDataConsumerCallbacks device_data_consumer_callbacks = {