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





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
<span foreground='red'>some text</span>

regards
hs



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