[gtkada] How do you specify the color?

Preben Randhol randhol at pvv.org
Tue Apr 16 15:24:28 CEST 2002


Emmanuel Briot <briot at ACT-Europe.FR> wrote on 12/04/2002 (10:54) :
> Set_Rgb (Color,
>          Blue  => Guint16 (your_blue  * Guint16'Last / 255),
>          Red   => Guint16 (your_red   * Guint16'Last / 255),
>          Green => Guint16 (your_green * Guint16'Last / 255));

One thing that I have never understood is whether one need to Alloc the
colour or not. Does somebody understands the usage of Alloc and could
explain whether one should use it or not?

Thanks in advance

Preben
-- 
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
                 «For me, Ada95 puts back the joy in programming.»




More information about the gtkada mailing list