[cairo-bugs] [Bug 76438] Cairo does not expose all Pixman surface formats
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Mar 21 03:50:45 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=76438
--- Comment #1 from Tal <tal.liron at gmail.com> ---
My simple patch, for those needing this feature:
Edit cairo-image-surface.c, and add the following:
cairo_surface_t *cairo_image_surface_create_with_pixman_format(unsigned char
*data, pixman_format_code_t pixman_format, int width, int height, int stride) {
return _cairo_image_surface_create_with_pixman_format(data, pixman_format,
width, height, stride);
}
An example of calling the newly-exposed API:
#include "cairo/cairo.h"
#include "pixman.h"
cairo_surface_t *cairo_image_surface_create_with_pixman_format(unsigned char
*data, pixman_format_code_t pixman_format, int width, int height, int stride);
cairo_surface_t *surface = cairo_image_surface_create_with_pixman_format(NULL,
PIXMAN_a8b8g8r8, width, height, -1);
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20140321/a6ad8c34/attachment.html>
More information about the cairo-bugs
mailing list