Package: pango

Function pango-cairo-create-layout

Lambda List

pango-cairo-create-layout (cr)

Arguments

cr -- a cairo-t context

Return Value

The newly created pango-layout object.

Details

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-size or drawing with functions like pango-cairo-show-layout. If you change the transformation or target surface for cr, you need to call the function 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 pango-context object for each layout. This might matter in an application that was laying out large amounts of text.
 

See also

2021-1-9