Grx.save_current_context

function save_current_context(where: Grx.Context): Grx.Context {
    // Gjs wrapper for grx_save_current_context()
}
  

Saves a copy of the current context.

This is generally used to temporarily save and restore a context. Example: |[<!-- language="C" --> 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); } ]|

where

unused Grx.Context where the context will be saved or null

Returns

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