summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-image-surface.c9
-rw-r--r--src/cairo.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 15b8f53e..ebf6c39f 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -365,18 +365,21 @@ cairo_image_surface_create_with_pixman_format (unsigned char *data,
unsigned int pixman_format,
int width,
int height,
- int stride)
+ ...)
{
cairo_surface_t *surface;
pixman_image_t *pixman_image;
+ va_list args;
if (! _cairo_image_surface_is_size_valid (width, height))
{
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
}
- pixman_image = pixman_image_create_bits (pixman_format, width, height,
- (uint32_t *) data, stride);
+ va_start (args, height);
+ pixman_image = pixman_image_create_bits_valist (pixman_format, width, height,
+ (uint32_t *) data, args);
+ va_end (args);
if (unlikely (pixman_image == NULL))
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
diff --git a/src/cairo.h b/src/cairo.h
index abbd1d10..227664a3 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -2164,7 +2164,7 @@ cairo_image_surface_create_with_pixman_format (unsigned char *data,
unsigned int pixman_format,
int width,
int height,
- int stride);
+ ...);
cairo_public unsigned char *
cairo_image_surface_get_data (cairo_surface_t *surface);