Re: DrawingArea and Text display.
- From: "Neil Hodgson" <nhodgson bigpond net au>
- To: <gtk-list gnome org>
- Subject: Re: DrawingArea and Text display.
- Date: Fri, 7 Mar 2003 18:14:08 +1100
Tony Denault:
> 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>
PangoContext *pcontext = gtk_widget_create_pango_context(widget);
PangoLayout *layout = pango_layout_new(pcontext);
char *utfForm = "Some UTF-8 text";
pango_layout_set_text(layout, utfForm, strlen(utfForm));
pango_layout_set_font_description(layout, Fixed_font);
PangoLayoutLine *pll = pango_layout_get_line(layout,0);
gdk_draw_layout_line(drawable, gc, x, ybase, pll);
Neil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]