PgCairo.createLayout

Creates a layout object set up to match the current transformation and target surface of the Cairo context. This layout can then be used for text measurement with functions like Layout.getSize or drawing with functions like pango_cairo_show_layout(). If you change the transformation or target surface for cr, you need to call pango_cairo_update_layout()

This function is the most convenient way to use Cairo with Pango, however it is slightly inefficient since it creates a separate gstreamer.Context object for each layout. This might matter in an application that was laying out large amounts of text.

struct PgCairo
static
createLayout

Parameters

cr Context

a Cairo context

Return Value

Type: PgLayout

the newly created gtk.Layout Free with g_object_unref().

Meta

Since

1.10