Tracé de textes
- XVII.V.I. Tracé de texte avec Pango
XVII.V.I. Tracé de texte avec Pango
Text is drawn via Pango Layouts. The easiest way to create a Pango::Layout is to use Gtk::Widget::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 Pango::Layout::show_in_cairo_context() method.
The Printing chapter contains an example of drawing text.