PangoCairo.create_layout
Description: Reference for PangoCairo.create_layout

### Function

# PangoCairo.create_layout

#### Declaration [src]

    PangoLayout*
    pango_cairo_create_layout (
      cairo_t* cr
    )

#### Description [src]

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 `pango_layout_get_size()` 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 `PangoContext` object for each layout. This might matter in an application that was laying out large amounts of text.

#### Parameters

`cr` | `cairo_t*`
| a Cairo context
| Ownership is not transferred to the callee

#### Return value

Returns: `PangoLayout*`
the newly created `PangoLayout`. Free with `g_object_unref()`.
Ownership of the data is transferred to the caller