Re: Looking for example to draw a simple red text on my GtkDrawable

2005-12-13 Thread HuamiSoft Hubert Sokolowski
Hi! You can use context = gdk_pango_context_get (); layout = pango_layout_new (context); pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT); pango_layout_set_markup (layout, str, -1); gdk_draw_layout (drawable, gc, x, y, layout); where str is pango markup text for example some text regar

Re: Looking for example to draw a simple red text on my GtkDrawable

2005-12-13 Thread Andrew J. Montalenti
Pango probably is "the right way to do it;" an alternative is to use Cairo's "toy text API," described here: http://www.cairographics.org/manual/cairo-Text.html This has a pretty straightforward approach, e.g.: ... cairo_select_font_face(cr, "Trebuchet MS", CAIRO_FONT_WEIGHT_BOLD, CAIRO_FON

Looking for example to draw a simple red text on my GtkDrawable

2005-12-13 Thread Bernd Muent
Hi together, I (only) want to draw a red text "Example" or whatever in the middle of a GtkDrawable. First I looked at gdk_draw_text. I did not find out how to draw a text in a specific color. And the other problem is that the documentation says that it is deprecated. I should use Pango rendering