Rita text

Rita text med 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.

Exempel

Here is an example of a program that draws some text, some of it upside-down. The Printing chapter contains another example of drawing text.

Rityta - Text

Källkod