[cairo] surface_create and pnm
gadido30 at gmail.com
Wed Dec 26 22:24:17 PST 2012
I will try to be more spcific, I want to convert from Surface (
cairo_xlib_surface_create) into Pixmap,
Is there fast or easy way to do it with Cairo?
On Tue, Dec 25, 2012 at 2:13 PM, Simon Sapin <simon.sapin at exyr.org> wrote:
> Le 25/12/2012 13:06, Gadi Dor a écrit :
> Dear Simon,
>> I am new in cairo , Do you mean something like:
> Don’t forget to "Reply to all" so that your message also goes to the
> mailing list.
> /* set image properties */
>> ca.width = screen_width;
>> ca.height = screen_height;
>> ca.stride = ca.width * 4;
>> ca.grid = G_malloc(ca.height * ca.stride);
>> surface =
>> (cairo_surface_t *) cairo_image_surface_create_**for_data(
>> ca.grid, CAIRO_FORMAT_ARGB32, ca.width, ca.height, ca.stride);
> Well, I don’t know. I’m more used to Python (and pycairo) than C. I gave
> the high-level idea of what I would try, but you need to figure out the
> details by "trial and error". Or maybe someone else can help.
> Simon Sapin
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo