Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 8
Associate a surface with the draw context
#include <gf/gf.h>
int gf_context_set_surface(
gf_context_t context,
gf_surface_t surface );
- context
- The draw context to associate a surface with.
- surface
- The handle for the surface to target. This handle is returned by gf_surface_create().
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().
|
- You can migrate a context to any surface, even if the new surface is on a different device.
- While it is acceptable to call any other gf_context_set_*() function while you are rendering (between calls to gf_draw_begin() and gf_draw_end()), calling gf_context_set_surface() during this time has no effect.
|
- GF_ERR_OK
- Success.
- GF_ERR_PARM
- The 2D engine can't render to the surface.
- GF_ERR_MEM
- An error ocurred while allocating working memory.
- GF_ERR_INUSE
- The context is rendering. Call gf_draw_end() first.
QNX Graphics Framework
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
gf_context_create(),
gf_context_free(),
gf_context_unset_surface(),
gf_surface_create()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 144
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_context_set_surface.html on line 144