Package: pango

Function pango:cairo-create-layout

Lambda List

pango:cairo-create-layout (cr)

Arguments

cr -- a cairo:context-t instance

Return Value

The newly created pango:layout object.

Details

Creates a Pango layout set up to match the current transformation and target surface of the Cairo context. This Pango layout can then be used for text measurement with functions like the pango:layout-size function or drawing with functions like the pango:cairo-show-layout function. If you change the transformation or target surface for the Cairo context, you need to call the pango:cairo-update-layout function.

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

See also

2025-1-1