save_current_context


Description:

public Context save_current_context (out Context? where = null)

Saves a copy of the current context.

This is generally used to temporarily save and restore a context. Example:

void my_function (GrxContext *my_context)
{
GrxContext save;

grx_save_current_context (&save);
grx_set_current_context (my_context);
// call some drawing functions
grx_set_current_context (&save);
}

Parameters:

where

unused Context where the context will be saved or null

Returns:

where or a new context if where was null. Returns null on error.


Namespace: Grx
Package: grx-3.0