| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) | 
Associate a surface with the draw context
#include <gf/gf.h>
int gf_context_set_surface(
        gf_context_t context,
        gf_surface_t surface );
gf
This function associates a surface for the draw context (or if there already is a surface associated with the context, this function allows you to target a new one). Any subsequent rendering that is done via this context affects the newly targeted surface. You can disassociate the surface from the context by calling gf_context_unset_surface().
|  | 
 | 
QNX Graphics Framework
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | Yes | 
gf_context_create(), gf_context_get_surface(), gf_context_free(), gf_context_unset_surface(), gf_surface_create()
| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) |