Function pangocairo::create_context [−][src]
pub fn create_context(cr: &Context) -> Option<Context>
Expand description
Creates a context object set up to match the current transformation
and target surface of the Cairo context. This context can then be
used to create a layout using pango::Layout::new()
.
This function is a convenience function that creates a context using
the default font map, then updates it to cr
. If you just need to
create a layout for use with cr
and do not need to access pango::Context
directly, you can use create_layout()
instead.
cr
a Cairo context
Returns
the newly created pango::Context
. Free with
g_object_unref()
.