[gtkada] Using Gdk.RGB.Draw_RGB_Image

manuel.op.de.coul at eon-benelux.com manuel.op.de.coul at eon-benelux.com
Wed May 2 11:38:52 CEST 2001


Pedro Diaz Jimenez wrote:
>The problem is that I don't know where to specify the size of the buffer,
>because after
>buffer := new Gdk.RGB.RGB_Buffer;
>I have a pointer to an (unconstrained?) array

This array is constrained but indeed enormous. It looks like a problem
with the Gdk.RGB package to me.
It could be changed to make the Rgb_Buffer type unconstrained.
The package body would need some changes too, for example
Rgb_Buf'Address changed to Rgb_Buf(Rgb_Buf'First)'Address
and an added check to see if Rgb_Buf is large enough and an exception
raised if not.
Perhaps a function could be added to calculate the necessary buffer size
based on image width and heigth?

Manuel Op de Coul






More information about the gtkada mailing list