zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SDL_fillrect.c File Reference
#include "SDL_config.h"
#include "SDL_video.h"
#include "SDL_blit.h"

Go to the source code of this file.

Functions

int SDL_FillRect (SDL_Surface *dst, const SDL_Rect *rect, Uint32 color)
 
static void SDL_FillRect1 (Uint8 *pixels, int pitch, Uint32 color, int w, int h)
 
static void SDL_FillRect2 (Uint8 *pixels, int pitch, Uint32 color, int w, int h)
 
static void SDL_FillRect3 (Uint8 *pixels, int pitch, Uint32 color, int w, int h)
 
static void SDL_FillRect4 (Uint8 *pixels, int pitch, Uint32 color, int w, int h)
 
int SDL_FillRects (SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color)
 

Function Documentation

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

Performs a fast fill of the given rectangle with color.

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.

Returns
0 on success, or -1 on error.

Definition at line 332 of file SDL_fillrect.c.

References SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::BytesPerPixel, SDL_Surface::clip_rect, SDL_Surface::format, SDL_Rect::h, SDL_Surface::pitch, SDL_Surface::pixels, SDL_FillRect1(), SDL_FillRect2(), SDL_FillRect3(), SDL_FillRect4(), SDL_HasMMX(), SDL_HasSSE(), SDL_IntersectRect(), SDL_SetError(), switch(), SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by _rotateSurface(), SDL_FillRects(), SDL_UnRLESurface(), and SW_RenderClear().

static void SDL_FillRect1 ( Uint8 pixels,
int  pitch,
Uint32  color,
int  w,
int  h 
)
static

Definition at line 235 of file SDL_fillrect.c.

References NULL, and SDL_memset4().

Referenced by SDL_FillRect().

static void SDL_FillRect2 ( Uint8 pixels,
int  pitch,
Uint32  color,
int  w,
int  h 
)
static

Definition at line 274 of file SDL_fillrect.c.

References NULL, and SDL_memset4().

Referenced by SDL_FillRect().

static void SDL_FillRect3 ( Uint8 pixels,
int  pitch,
Uint32  color,
int  w,
int  h 
)
static

Definition at line 298 of file SDL_fillrect.c.

References NULL.

Referenced by SDL_FillRect().

static void SDL_FillRect4 ( Uint8 pixels,
int  pitch,
Uint32  color,
int  w,
int  h 
)
static

Definition at line 320 of file SDL_fillrect.c.

References SDL_memset4().

Referenced by SDL_FillRect().

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

Definition at line 436 of file SDL_fillrect.c.

References i, SDL_FillRect(), and SDL_SetError().

Referenced by SW_RenderFillRects().