Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

SDL_FillRect (3)

Name

SDL_FillRect - gle with some color

Synopsis

#include "SDL.h"

int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);

Description

SDL_FillRect(3)                SDL API Reference               SDL_FillRect(3)



NAME
       SDL_FillRect  - This function performs a fast fill of the given rectan-
       gle with some color

SYNOPSIS
       #include "SDL.h"

       int SDL_FillRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);

DESCRIPTION
       This function performs a fast fill of the given rectangle  with  color.
       If dstrect is NULL, the whole surface will be filled with color.

       The  color should be a pixel of the format used by the surface, and can
       be generated by the SDL_MapRGB or SDL_MapRGBA functions. If  the  color
       value  contains  an alpha value then the destination is simply "filled"
       with that alpha information, no blending takes place.

       If there is a clip rectangle set on the destination (set  via  SDL_Set-
       ClipRect) then this function will clip based on the intersection of the
       clip rectangle and the dstrect rectangle and the dstrect rectangle will
       be modified to represent the area actually filled.

RETURN VALUE
       This function returns 0 on success, or -1 on error.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/sdl      |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       SDL_MapRGB, SDL_MapRGBA, SDL_BlitSurface, SDL_Rect



NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source        was        downloaded        from        https://www.lib-
       sdl.org/release/SDL-1.2.15.tar.gz

       Further information about this software can be found on the open source
       community website at https://www.libsdl.org/.



SDL                         Tue 11 Sep 2001, 23:01             SDL_FillRect(3)