Color and Style in a DrawingAr



This message was sent from Geocrawler.com by "Ludo" <ludovic.damizet@eisti.fr>
Be sure to reply to that address.

Graph is a pixmap *
Couleur is a GdkColor *
Style is a GdkGc *
there is a probleme at the set_foreground
I want to trace a red line in a pixmap


  if (Graph != NULL)
    { 
    
     Couleur=(GdkColor *)malloc(sizeof GdkColor));
     Style=(GdkGC *)malloc(sizeof(GdkGC));

      Couleur->red = 6500; 
      Couleur->green = 0;
      Couleur->blue = 0;  
 
     gdk_color_alloc (gdk_colormap_get_system (), 
Couleur); 
      gdk_gc_set_foreground(Style,Couleur);

   
      Area=lookup_widget(GTK_WIDGET
(Gwindow_graphique),"drawingarea1");
      gdk_draw_rectangle(Graph,Style, 
TRUE,20,10,60,50);    
    
      update.x=0;
      update.y=0;
      update.width=Area->allocation.width;
      update.height=Area->allocation.height;
    
      gtk_widget_draw(Area,&update);
      
   

    }
}

thank you

Geocrawler.com - The Knowledge Archive



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]