[gtkada] Problem with color
    Christophe Baillon 
    cbaillon at ifrance.com
       
    Wed Dec 27 15:38:44 CET 2000
    
    
  
Hello !
I have made a procedure putpixel who is drawing a point in a drawing object i
have created before.
It give in argument the color of the pixel, using the parse function (for
rgb.txt).
The procedure is working except i obtain a bad color on the screen.
Sometimes the pixel is blue, sometime it is red, instead of being yellow for
example.
What is the problem ?
This is my procedure :
   procedure Put_Pixel(Object : in My_Drawing;
                       X      : in Gint;
                       Y      : in Gint;
                       Color  : in String) is
      Gc      : Gdk.Gc.Gdk_Gc;
      G_Color : Gdk_Color;
   begin
      Put_Line("Color : "& Color);
      Gdk_New(Gc, Get_Window(Object));
      G_Color := Parse(color);
      Set_Foreground(Gc, G_Color);
      Draw_Point(Object.Pixmap,
                 Gc,
                 X,
                 Y);
      Destroy(Gc);
   exception
      when others =>
         Put_Line ("Impossible d'alouer la couleur !");
   end Put_Pixel;
Thanks
--
------------------------------
--  Christophe Baillon      --
--  ITRIS                   --
------------------------------
 
______________________________________________________________________________
Vous avez un site perso ?
2 millions de francs à gagner sur i(france) !
Webmasters : ZE CONCOURS ! http://www.ifrance.com/_reloc/concours.emailif
    
    
More information about the gtkada
mailing list