DrawingArea and Text display.
- From: Tony Denault <denault hawaii edu>
- To: gtk-list gnome org
- Subject: DrawingArea and Text display.
- Date: Thu, 06 Mar 2003 12:05:31 -1000 (HST)
Hi,
Trying to convert some 1.2 gtk code to 2.0. Trying not to use any
deprecated functions. I used the DrawingArea to display my own
text using different font & colors. However documentation is very scarce.
Could some explain the new way for something like this:
Fixed_font = gdk_font_load ("fixed");
GC = gdk_gc_new(base_window->window);
sprintf( buf, "Temperature is %6.2f K ", temperature_value );
gdk_draw_text( da->window, Fixed_font, GC, x, y, buf, strlen(buf) );
So far:
Fixed_font = pango_font_description_from_string ("Fixed");
GC = gdk_gc_new(base_window->window);
<stuck on how to display string in Drawing area using pango>
Thanks,
Tony
/-----------------------------------------------------------------------\
| Tony Denault | Email: denault irtf ifa hawaii edu |
| Institute for Astronomy | Phone: (808) 932-2378 |
| 640 North Aohoku Place | Fax: (808) 933-0737 |
| Hilo, Hawaii 96720 | |
\-----------------------------------------------------------------------/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]