buffer_set_surface

With this function you can write information from a buffer to a given surface.

Both the buffer and the surface must have been created previously, and the buffer's size must be equal to or greater than the surface's size. If the buffer is smaller than the surface, the function will silently fail.

You can provide an offset into the buffer to start reading from. Reading will always start at the beginning of the buffer plus the offset value and not at the current seek position plus the offset value.

 

Syntax:

buffer_set_surface(buffer, surface, offset);

Argument Type Description
buffer Buffer The index of the buffer to use.
surface Surface The index of the surface to use.
offset Real The data offset value.

 

Returns:

N/A

 

Example:

buffer_set_surface(buff, application_surface, 0);

The above code will copy all the data stored in the buffer indexed in the variable "buff" to the application surface with no offset.