SDL_test_imagePrimitivesBlend.c File Reference
`#include "SDL_config.h"`
`#include "SDL_test.h"`
Include dependency graph for SDL_test_imagePrimitivesBlend.c:

Go to the source code of this file.

## Functions

SDL_Surface * | SDLTest_ImagePrimitivesBlend ()
| Returns the PrimitivesBlend test image as SDL_Surface. More...

## Variables

const SDLTest_SurfaceImage_t | SDLTest_imagePrimitivesBlend

## Function Documentation

SDL_Surface* SDLTest_ImagePrimitivesBlend | ( |  | ) |

Returns the PrimitivesBlend test image as SDL_Surface.

Definition at line 673 of file SDL_test_imagePrimitivesBlend.c.

References SDLTest_SurfaceImage_t::bytes_per_pixel, SDLTest_SurfaceImage_t::height, SDLTest_SurfaceImage_t::pixel_data, SDL_BIG_ENDIAN, SDL_BYTEORDER, SDL_CreateRGBSurfaceFrom, and SDLTest_SurfaceImage_t::width.

Referenced by render_testPrimitivesBlend().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imagePrimitivesBlend.pixel_data,
SDLTest_imagePrimitivesBlend.width,
SDLTest_imagePrimitivesBlend.height,
SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8,
SDLTest_imagePrimitivesBlend.width * SDLTest_imagePrimitivesBlend.bytes_per_pixel,
#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
0xff000000, /* Red bit mask. */
0x00ff0000, /* Green bit mask. */
0x0000ff00, /* Blue bit mask. */
0x000000ff /* Alpha bit mask. */
#else
0x000000ff, /* Red bit mask. */
0x0000ff00, /* Green bit mask. */
0x00ff0000, /* Blue bit mask. */
0xff000000 /* Alpha bit mask. */
#endif
);
return surface;
}
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDLTest_imagePrimitivesBlend
const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend
Definition: SDL_test_imagePrimitivesBlend.c:27
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:449
SDLTest_SurfaceImage_t::pixel_data
const char * pixel_data
Definition: SDL_test_images.h:54
SDL_BIG_ENDIAN
#define SDL_BIG_ENDIAN
Definition: SDL_endian.h:38
SDLTest_SurfaceImage_t::bytes_per_pixel
unsigned int bytes_per_pixel
Definition: SDL_test_images.h:53
SDL_BYTEORDER
#define SDL_BYTEORDER
Definition: SDL_config_pandora.h:36

## Variable Documentation

const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend

Definition at line 27 of file SDL_test_imagePrimitivesBlend.c.