Context.save
void save()Makes a copy of the current state of cr and saves it on an internal stack of saved states for cr. When [cairo.context.Context.restore] is called, cr will be restored to the saved state. Multiple calls to [cairo.context.Context.save] and [cairo.context.Context.restore] can be nested; each call to [cairo.context.Context.restore] restores the state from the matching paired [cairo.context.Context.save].
It isn't necessary to clear all saved states before a #cairo_t is freed. If the reference count of a #cairo_t drops to zero in response to a call to [cairo.global.destroy], any saved states will be freed along with the #cairo_t.