Context.popGroupToSource
void popGroupToSource()Terminates the redirection begun by a call to [cairo.context.Context.pushGroup] or [cairo.context.Context.pushGroupWithContent] and installs the resulting pattern as the source pattern in the given cairo context.
The behavior of this function is equivalent to the sequence of operations:
<informalexample><programlisting>cairo_pattern_t *group = cairo_pop_group (cr); cairo_set_source (cr, group); cairo_pattern_destroy (group);
</programlisting></informalexample>but is more convenient as their is no need for a variable to store the short-lived pointer to the pattern.
The [cairo.context.Context.popGroup] function calls [cairo.context.Context.restore], (balancing a call to [cairo.context.Context.save] by the push_group function), so that any changes to the graphics state will not be visible outside the group.