Go to the source code of this file.
|
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_FillRect (SDL_Surface *dst, const SDL_Rect *rect, Uint32 color) |
|
int | SDL_FillRects (SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color) |
|
◆ SDL_FillRect()
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 238 of file SDL_fillrect.c.
References rect, SDL_FillRects(), SDL_RectEmpty(), and SDL_SetError.
◆ SDL_FillRect1()
static void SDL_FillRect1 |
( |
Uint8 * |
pixels, |
|
|
int |
pitch, |
|
|
Uint32 |
color, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ SDL_FillRect2()
static void SDL_FillRect2 |
( |
Uint8 * |
pixels, |
|
|
int |
pitch, |
|
|
Uint32 |
color, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ SDL_FillRect3()
static void SDL_FillRect3 |
( |
Uint8 * |
pixels, |
|
|
int |
pitch, |
|
|
Uint32 |
color, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ SDL_FillRect4()
static void SDL_FillRect4 |
( |
Uint8 * |
pixels, |
|
|
int |
pitch, |
|
|
Uint32 |
color, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
static |
◆ SDL_FillRects()
Definition at line 299 of file SDL_fillrect.c.
313 if (
dst->format->BitsPerPixel < 8) {
314 return SDL_SetError(
"SDL_FillRect(): Unsupported surface format");
319 return SDL_SetError(
"SDL_FillRect(): You must lock the surface");
323 return SDL_SetError(
"SDL_FillRects() passed NULL rects");
326 #if SDL_ARM_NEON_BLITTERS
328 switch (
dst->format->BytesPerPixel) {
330 fill_function = fill_8_neon;
333 fill_function = fill_16_neon;
336 fill_function = fill_32_neon;
341 #if SDL_ARM_SIMD_BLITTERS
343 switch (
dst->format->BytesPerPixel) {
345 fill_function = fill_8_simd;
348 fill_function = fill_16_simd;
351 fill_function = fill_32_simd;
357 if (fill_function ==
NULL) {
358 switch (
dst->format->BytesPerPixel) {
365 fill_function = SDL_FillRect1SSE;
378 fill_function = SDL_FillRect2SSE;
397 fill_function = SDL_FillRect4SSE;
419 rect->
x *
dst->format->BytesPerPixel;
References SDL_Rect::h, i, NULL, rect, SDL_FillRect1(), SDL_FillRect2(), SDL_FillRect3(), SDL_FillRect4(), SDL_HasARMSIMD, SDL_HasNEON, SDL_HasSSE, SDL_IntersectRect, SDL_SetError, void, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.
Referenced by SDL_FillRect().
GLuint GLuint GLsizei count
static void SDL_FillRect4(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
#define SDL_IntersectRect
SDL_FORCE_INLINE SDL_bool SDL_RectEmpty(const SDL_Rect *r)
Returns true if the rectangle has no area.
GLfloat GLfloat GLfloat GLfloat h
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)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
static void SDL_FillRect3(Uint8 *pixels, int pitch, Uint32 color, int w, int h)
A rectangle, with the origin at the upper left (integer).
const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char const char const SDL_SCANF_FORMAT_STRING char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
EGLSurface EGLint * rects
int SDL_FillRects(SDL_Surface *dst, const SDL_Rect *rects, int count, Uint32 color)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
GLubyte GLubyte GLubyte GLubyte w