Re: surface_create and pnm
Simon Sapin <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
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 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo