[cairo] surface_create and pnm
Simon Sapin
simon.sapin at exyr.org
Tue Dec 25 04:13:21 PST 2012
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
More information about the cairo
mailing list