[gtkada] Cairo : Binding hints for cairo_image_surface_create_from_png_stream
David SAUVAGE - AdaLabs Ltd
david.sauvage at adalabs.com
Sat Sep 10 06:54:09 CEST 2011
Hi Damien,
thanks for your answer,
Cheers,
David SAUVAGE
Software Agile Architect, Director
AdaLabs Ltd - Mauritius
http://adalabs.com
+230 428 18 32
skype sauvaged
BRN C10097052
VAT 27035043
Le 10/09/2011 01:40, Anne et Damien Carbonne a écrit :
> Le 09/09/2011 14:34, David SAUVAGE - AdaLabs Ltd a écrit :
>> Hi,
>>
>> As those cairo services [1] do not seem to be part of the current GTKAda
>> bindings, I am trying to add them.
>>
>> I have a pain concerning cairo_image_surface_create_from_png_stream [2],
>> as the cairo_read_func_t type seems to require in the Ada world a
>> function that would have out parameter to be able to proceed a memory
>> allocation for the data parameter [2] (thus, using an anonymous access
>> type does not seems to be sufficient).
>>
>> Any tips that could help me achieve this in Ada using the current GNAT
>> GPL 2011 is most welcome.
>>
>> Cheers,
>>
>> [1]
>> cairo_surface_write_to_png_stream
>> cairo_image_surface_create_from_png_stream
>>
>> http://cgit.freedesktop.org/cairo/tree/src/cairo.h
>>
>> [2]
>> http://cairographics.org/manual/cairo-PNG-Support.html#cairo-image-surface-create-from-png-stream
>>
>>
> Hi,
>
> You may have a look at the CairoAda binding
> (http://sourceforge.net/projects/cairoada/) I created to see how I
> handled this case. This binding is normally complete.
> I think one main difference with the AdaCore version is that I tried to
> hide all functions related to reference counts. They are automatically
> handled.
>
> Regards,
> Damien
> _______________________________________________
> gtkada mailing list
> gtkada at lists.adacore.com
> http://lists.adacore.com/mailman/listinfo/gtkada
More information about the gtkada
mailing list