Method

ClutterStageread_pixels

Declaration [src]

guchar*
clutter_stage_read_pixels (
  ClutterStage* stage,
  gint x,
  gint y,
  gint width,
  gint height
)

Description [src]

Makes a screenshot of the stage in RGBA 8bit data, returns a linear buffer with width * 4 as rowstride.

The alpha data contained in the returned buffer is driver-dependent, and not guaranteed to hold any sensible value.

Parameters

x

Type: gint

X coordinate of the first pixel that is read from stage.

y

Type: gint

Y coordinate of the first pixel that is read from stage.

width

Type: gint

Width dimension of pixels to be read, or -1 for the entire stage width.

height

Type: gint

Height dimension of pixels to be read, or -1 for the entire stage height.

Return value

Type: An array of guchar

A pointer to newly allocated memory with the buffer or NULL if the read failed. Use g_free() on the returned data to release the resources it has allocated.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.