Wiki Page Content

Differences between revisions 4 and 5
Revision 4 as of 2010-09-03 17:12:44
Size: 1354
Editor: SheenaSmith
Comment: update content - standard return value
Revision 5 as of 2010-10-10 21:58:05
Size: 1361
Editor: SheenaSmith
Comment: update content - pointers, structs
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
||'''dst'''||a pointer to the destination surface / [[SDL_Surface]] containing the rectangles||
||'''rects'''||a pointer to a pointer containing the rectangles / [[SDL_Rect]]s to fill||
||'''count'''||the number of rectangles to fill||
||'''dst'''||the destination [[SDL_Surface]] containing the rectangles||
||'''rects'''||an array of [[SDL_Rect]] structures representing the rectangles to fill||
||'''count'''||the number of rectangles in the array||
Line 33: Line 33:
If '''rects''' is NULL, the whole surface will be filled with color. <<Color2(green,Is this note applicable to this function?)>> If '''rects''' is NULL, the whole surface will be filled with color. <<Color2(green,Is this note applicable to this function?  Move it up to the param?)>>

DRAFT

SDL_FillRects

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

Syntax

int SDL_FillRects(SDL_Surface*     dst,
                  const SDL_Rect** rects,
                  int              count,
                  Uint32           color)

Function Parameters

dst

the destination SDL_Surface containing the rectangles

rects

an array of SDL_Rect structures representing the rectangles to fill

count

the number of rectangles in the array

color

the color to fill the rectangles with

Return Value

Returns 0 on success or a negative error code on failure; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

If rects is NULL, the whole surface will be filled with color. green

The color should be a pixel of the format used by the surface, and can be generated by the SDL_MapRGB() function.


CategoryAPI, CategorySurface

None: SDL_FillRects (last edited 2011-03-12 19:48:37 by SheenaSmith)

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