Fill an area of a specified buffer.
Synopsis:
#include <screen/screen.h>
int screen_fill(screen_context_t ctx, screen_buffer_t dst, const int *attribs)
Arguments:
- ctx
-
A connection to screen
- dst
-
The buffer which data will be copied to.
- attribs
-
A list that contains the attributes that define the blit. This list must consist of a series of token-value pairs terminated
with a SCREEN_BLIT_END token. The tokens used in this list must be of type Screen blit types.
Library:
libscreen
Description:
Function Type: Delayed Execution
This function requests that a rectangular area of the destination buffer be filled with a solid color.
The
attribs argument is allowed to be
NULL or empty (i.e. contains a single element that is set to
SCREEN_BLIT_END). If
attribs is empty, then the following defaults will be applied:
- the destination rectangle's vertical and horizontal positions are 0
- the destination buffer includes the entire destination buffer
- the transparency is SCREEN_TRANSPARENCY_NONE
- the global alpha value is 255 (or opaque)
- the scale quality is SCREEN_QUALITY_NORMAL.
- the color is #ffffff (white)
To change any of this default behavior, set
attribs with pairings of the following valid tokens and their desired values:
Returns:
0 if the blit operation was queued, or -1 if an error occurred (errno is set).