<div dir="ltr">Hi All, <br><br>I will try to be more spcific, I want to convert from Surface (<span>cairo_xlib_surface_create)</span> into Pixmap,<br><br>Is there fast or easy way to do it with Cairo?<br><br>Best Regards,<br>
Gadi<br><br><div class="gmail_quote">On Tue, Dec 25, 2012 at 2:13 PM, Simon Sapin <span dir="ltr"><<a href="mailto:simon.sapin@exyr.org" target="_blank">simon.sapin@exyr.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 25/12/2012 13:06, Gadi Dor a écrit :<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear Simon,<br>
<br>
I am new in cairo , Do you mean something like:<br>
</blockquote>
<br></div>
Don’t forget to "Reply to all" so that your message also goes to the mailing list.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  /* set image properties */<br>
     ca.width = screen_width;<br>
     ca.height = screen_height;<br>
     ca.stride = ca.width * 4;<br>
<br>
ca.grid = G_malloc(ca.height * ca.stride);<br>
surface =<br>
         (cairo_surface_t *) cairo_image_surface_create_<u></u>for_data(<br>
         ca.grid, CAIRO_FORMAT_ARGB32, ca.width, ca.height, ca.stride);<br>
</blockquote>
<br></div>
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.<span class="HOEnZb"><font color="#888888"><br>

<br>
-- <br>
Simon Sapin<br>
</font></span></blockquote></div><br></div>