gf_display_snapshot()

Save the contents of a display to a surface

Synopsis:

#include <gf/gf.h>

int gf_display_snapshot( gf_display_t display,
                         int output,
                         int x1,
                         int y1,
                         int x2,
                         int y2,
                         gf_surface_t surface );

Arguments:

display
The handle for the display to make a snapshot from. This is the handle acquired by gf_display_attach().
output
The output to capture the snapshot from.
x1, y1, x2, y2
The coordinates of the snapshot area. If this rectangle extends beyond the display area, the resulting snapshot is clipped to the intersection of the rectangle and the display area.
surface
The destination surface to save the snapshot to.

Library:

gf

Description:

This function creates a snapshot of a defined area on a specified output for a display. All visible layers are captured and flattened into a single layer, and the resulting snapshot is saved to a surface you pass to the function.


Note: Only the Fujitsu Carmine hardware supports this function. If it is called on other hardware, it will fail and return GF_ERR_NOSUPPORT.


WARNING: Threads should not call this function between calls to gf_draw_begin() and gf_draw_end(), or a deadlock will occur.

Returns:

GF_ERR_OK
Success.
GF_ERR_NOSUPPORT
The hardware doesn't support this functionality.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_display_attach()