Re: Text rendering with pango and gtkpixbuf (Gonzalo Aguilar Delgado)



You need allocate the color before use it.
You can try:
...
Gc = gdk_gc_new(GTK_WIDGET (map)->window);

/*BEGIN NEW*/

/*View:
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Colormaps-and-Colors.html*/
if (!gdk_colormap_alloc_color(
         gdk_colormap_get_system (),
         &fore, TRUE, TRUE)
   ) {/*ERROR: NO gdk_colormap_alloc_color*/}

/*END NEW*/

/* I use this because without colors does not work,
nor with this... */     
gdk_draw_layout_with_colors(GTK_WIDGET(map)->window,Gc,(gint)winx,(gint)winy,
playout,&fore,NULL);
...


Lucky!

___________________________________________________
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es



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