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_surface_reattach.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_surface_reattach.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_surface_reattach.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_surface_reattach.html on line 8

gf_surface_reattach()

Recycle a surface previously created with gf_surface_attach()

Synopsis:

#include <gf/gf.h>

int gf_surface_reattach( gf_surface_t            surface,
                         int                     w,
                         int                     h,
                         int                     stride,
                         const gf_palette_t *    palette,
                         uint8_t *               ptr,
                         unsigned                flags );

Arguments:

surface
The handle of the surface that was created with gf_surface_attach()
w, h
The new height and width of the surface, in pixels
stride
Number of bytes per scanline in the new memory buffer
palette
A pointer to a gf_palette_t structure, which represents the new surface palette. You may pass NULL if the surface format is not palette-based (GF_FORMAT_PAL8), or if you don't want to change the palette associated with the surface.
ptr
A pointer to the new memory buffer containing image data.
flags
Flags affecting the surface properties. None are defined; pass 0.

Library:

gf

Description:

This function recycles a surface that was previously created with gf_surface_attach(). This function allows a different region of memory to be associated with the specified surface. The format of the data must remain the same.

This function is designed to be fast, and avoids re-allocation of memory in situations where you want to re-use a surface repeatedly.

Returns:

GF_ERR_OK
Success.
GF_ERR_PARM
The characteristics of the specified palette didn't match the palette that was originally passed to gf_surface_attach()

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_palette_t, gf_surface_attach(), gf_surface_create(), gf_surface_create_layer(), gf_surface_free()


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_surface_reattach.html on line 153

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_surface_reattach.html on line 153