Wiki Page Content

Revision 1 as of 2010-03-07 21:45:01

Clear message

DRAFT

SDL_FillRect

Use this function to perform a fast fill of the given rectangle with color.

Syntax

int SDLCALL SDL_FillRect(SDL_Surface*    dst,
                         const SDL_Rect* rect,
                         Uint32          color)

Function Parameters

dst

a pointer to the destination surface / SDL_Surface containing the rectangle

rect

a pointer to the rectangle / SDL_Rect to fill

color

the color to fill the rectangle with

Return Value

Returns 0 on success, or -1 on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

If rect 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() function.


CategoryAPI, CategorySurface

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit