Re: surface_create and pnm

Gadi Dor <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAPVeivof3G4Hpp7LH=LCbfuegfy_tvc_4Q6rna0Tr2vG106TeQ@mail.gmail.com>
Hi All,

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?

Best Regards,
Gadi

On Tue, Dec 25, 2012 at 2:13 PM, Simon Sapin <[email protected]> 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
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.