|
Size: 1486
Comment: update content - structs and enums, an/the
|
Size: 1505
Comment: update content - w/ Sam; remove draft
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 6: | Line 5: |
| Use this function to perform a fast fill of ,,the given,, ^a set of^ rectangles with ^a specific^ color. | Use this function to perform a fast fill of a set of rectangles with a specific color. |
| Line 19: | Line 18: |
| ||'''dst'''||the destination [[SDL_Surface]] structure ,,containing the rectangles,,|| ||'''rects'''||an array of [[SDL_Rect]] structures representing the rectangles to fill^ , or NULL to fill the entire render target^|| |
||'''dst'''||the [[SDL_Surface]] structure that is the drawing target|| ||'''rects'''||an array of [[SDL_Rect]] structures representing the rectangles to be filled|| |
| Line 22: | Line 21: |
| ||'''color'''||the color to fill the rectangles with; see [[#Remarks|Remarks]] for details|| | ||'''color'''||the color to fill with; see [[#Remarks|Remarks]] for details|| |
| Line 33: | Line 32: |
| 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?)>> | '''color''' should be a pixel of the format used by the surface, and can be generated by [[SDL_MapRGB]]() or [[SDL_MapRGBA]](). If the color value contains an alpha component then the destination is simply filled with that alpha information, no blending takes place. |
| Line 35: | Line 34: |
| ,,The,, '''color''' should be a pixel of the format used by the surface, and can be generated by the [[SDL_MapRGB]]() function. | If there is a clip rectangle set on the destination (set via [[SDL_SetClipRect]]()), then this function will fill based on the intersection of the clip rectangle and '''rects'''. |
SDL_FillRects
Use this function to perform a fast fill of a set of rectangles with a specific color.
Contents
Syntax
int SDL_FillRects(SDL_Surface* dst,
const SDL_Rect** rects,
int count,
Uint32 color)
Function Parameters
dst |
the SDL_Surface structure that is the drawing target |
rects |
an array of SDL_Rect structures representing the rectangles to be filled |
count |
the number of rectangles in the array |
color |
the color to fill with; see Remarks for details |
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
color should be a pixel of the format used by the surface, and can be generated by SDL_MapRGB() or SDL_MapRGBA(). If the color value contains an alpha component 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_SetClipRect()), then this function will fill based on the intersection of the clip rectangle and rects.
