Drawing Text
- 17.5.1. Drawing Text with Pango
17.5.1. Drawing Text with Pango
Text is drawn via Pango Layouts. The easiest way to create a Pango::Layout is to use create_pango_layout. Once created, the layout can be manipulated in various ways, including changing the text, font, etc. Finally, the layout can be rendered using the draw_layout method of Gdk::Drawable, which takes a Gdk::GC object, an x-position, a y-position and the layout itself.