SDL_test_images.h File Reference
`#include "SDL.h"`
`#include "begin_code.h"`
`#include "close_code.h"`
Include dependency graph for SDL_test_images.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | SDLTest_SurfaceImage_t

## Functions

SDL_Surface * | SDLTest_ImageBlit (void)
| Returns the Blit test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitColor (void)
| Returns the BlitColor test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitAlpha (void)
| Returns the BlitAlpha test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitBlendAdd (void)
| Returns the BlitBlendAdd test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitBlend (void)
| Returns the BlitBlend test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitBlendMod (void)
| Returns the BlitBlendMod test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitBlendNone (void)
| Returns the BlitBlendNone test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageBlitBlendAll (void)
| Returns the BlitBlendAll test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImageFace (void)
| Returns the Face test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImagePrimitives (void)
| Returns the Primitives test image as SDL_Surface. More...
SDL_Surface * | SDLTest_ImagePrimitivesBlend (void)
| Returns the PrimitivesBlend test image as SDL_Surface. More...

## Detailed Description

Include file for SDL test framework.

This code is a part of the SDL2_test library, not the main SDL library.

Definition in file SDL_test_images.h.

## Function Documentation

## SDLTest_ImageBlit()

SDL_Surface* SDLTest_ImageBlit | ( | void |  | ) |

Returns the Blit test image as SDL_Surface.

Definition at line 541 of file SDL_test_imageBlit.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 _surfaceSetUp(), render_testBlit(), and surface_testBlit().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlit.pixel_data,
SDLTest_imageBlit.width,
SDLTest_imageBlit.height,
SDLTest_imageBlit.bytes_per_pixel * 8,
SDLTest_imageBlit.width * SDLTest_imageBlit.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
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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
SDLTest_imageBlit
static const SDLTest_SurfaceImage_t SDLTest_imageBlit
Definition: SDL_test_imageBlit.c:27
SDL_BYTEORDER
#define SDL_BYTEORDER
Definition: SDL_config_pandora.h:37

## SDLTest_ImageBlitAlpha()

SDL_Surface* SDLTest_ImageBlitAlpha | ( | void |  | ) |

Returns the BlitAlpha test image as SDL_Surface.

Definition at line 1536 of file SDL_test_imageBlit.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_testBlitAlpha(), and surface_testBlitAlphaMod().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitAlpha.pixel_data,
SDLTest_imageBlitAlpha.width,
SDLTest_imageBlitAlpha.height,
SDLTest_imageBlitAlpha.bytes_per_pixel * 8,
SDLTest_imageBlitAlpha.width * SDLTest_imageBlitAlpha.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_imageBlitAlpha
static const SDLTest_SurfaceImage_t SDLTest_imageBlitAlpha
Definition: SDL_test_imageBlit.c:1047
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImageBlitBlend()

SDL_Surface* SDLTest_ImageBlitBlend | ( | void |  | ) |

Returns the BlitBlend test image as SDL_Surface.

Definition at line 1111 of file SDL_test_imageBlitBlend.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_testBlitBlend(), and surface_testBlitBlendBlend().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlend.pixel_data,
SDLTest_imageBlitBlend.width,
SDLTest_imageBlitBlend.height,
SDLTest_imageBlitBlend.bytes_per_pixel * 8,
SDLTest_imageBlitBlend.width * SDLTest_imageBlitBlend.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_imageBlitBlend
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlend
Definition: SDL_test_imageBlitBlend.c:604
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImageBlitBlendAdd()

SDL_Surface* SDLTest_ImageBlitBlendAdd | ( | void |  | ) |

Returns the BlitBlendAdd test image as SDL_Surface.

Definition at line 581 of file SDL_test_imageBlitBlend.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_testBlitBlend(), and surface_testBlitBlendAdd().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendAdd.pixel_data,
SDLTest_imageBlitBlendAdd.width,
SDLTest_imageBlitBlendAdd.height,
SDLTest_imageBlitBlendAdd.bytes_per_pixel * 8,
SDLTest_imageBlitBlendAdd.width * SDLTest_imageBlitBlendAdd.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_imageBlitBlendAdd
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAdd
Definition: SDL_test_imageBlitBlend.c:27
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImageBlitBlendAll()

SDL_Surface* SDLTest_ImageBlitBlendAll | ( | void |  | ) |

Returns the BlitBlendAll test image as SDL_Surface.

Definition at line 2822 of file SDL_test_imageBlitBlend.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_testBlitBlend(), and surface_testBlitBlendLoop().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendAll.pixel_data,
SDLTest_imageBlitBlendAll.width,
SDLTest_imageBlitBlendAll.height,
SDLTest_imageBlitBlendAll.bytes_per_pixel * 8,
SDLTest_imageBlitBlendAll.width * SDLTest_imageBlitBlendAll.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_imageBlitBlendAll
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendAll
Definition: SDL_test_imageBlitBlend.c:2377
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImageBlitBlendMod()

SDL_Surface* SDLTest_ImageBlitBlendMod | ( | void |  | ) |

Returns the BlitBlendMod test image as SDL_Surface.

Definition at line 1541 of file SDL_test_imageBlitBlend.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_testBlitBlend(), and surface_testBlitBlendMod().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendMod.pixel_data,
SDLTest_imageBlitBlendMod.width,
SDLTest_imageBlitBlendMod.height,
SDLTest_imageBlitBlendMod.bytes_per_pixel * 8,
SDLTest_imageBlitBlendMod.width * SDLTest_imageBlitBlendMod.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_imageBlitBlendMod
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendMod
Definition: SDL_test_imageBlitBlend.c:1134
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImageBlitBlendNone()

SDL_Surface* SDLTest_ImageBlitBlendNone | ( | void |  | ) |

Returns the BlitBlendNone test image as SDL_Surface.

Definition at line 2354 of file SDL_test_imageBlitBlend.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_testBlitBlend(), and surface_testBlitBlendNone().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitBlendNone.pixel_data,
SDLTest_imageBlitBlendNone.width,
SDLTest_imageBlitBlendNone.height,
SDLTest_imageBlitBlendNone.bytes_per_pixel * 8,
SDLTest_imageBlitBlendNone.width * SDLTest_imageBlitBlendNone.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
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
SDLTest_imageBlitBlendNone
static const SDLTest_SurfaceImage_t SDLTest_imageBlitBlendNone
Definition: SDL_test_imageBlitBlend.c:1564
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:37

## SDLTest_ImageBlitColor()

SDL_Surface* SDLTest_ImageBlitColor | ( | void |  | ) |

Returns the BlitColor test image as SDL_Surface.

Definition at line 1024 of file SDL_test_imageBlit.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_testBlitColor(), and surface_testBlitColorMod().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageBlitColor.pixel_data,
SDLTest_imageBlitColor.width,
SDLTest_imageBlitColor.height,
SDLTest_imageBlitColor.bytes_per_pixel * 8,
SDLTest_imageBlitColor.width * SDLTest_imageBlitColor.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
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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
SDLTest_imageBlitColor
static const SDLTest_SurfaceImage_t SDLTest_imageBlitColor
Definition: SDL_test_imageBlit.c:564
SDL_BYTEORDER
#define SDL_BYTEORDER
Definition: SDL_config_pandora.h:37

## SDLTest_ImageFace()

SDL_Surface* SDLTest_ImageFace | ( | void |  | ) |

Returns the Face test image as SDL_Surface.

Definition at line 224 of file SDL_test_imageFace.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 _loadTestFace(), _testBlitBlendMode(), mouse_createFreeColorCursor(), surface_testCompleteSurfaceConversion(), surface_testSaveLoadBitmap(), and surface_testSurfaceConversion().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imageFace.pixel_data,
SDLTest_imageFace.width,
SDLTest_imageFace.height,
SDLTest_imageFace.bytes_per_pixel * 8,
SDLTest_imageFace.width * SDLTest_imageFace.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
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
SDLTest_imageFace
static const SDLTest_SurfaceImage_t SDLTest_imageFace
Definition: SDL_test_imageFace.c:27
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:37

## SDLTest_ImagePrimitives()

SDL_Surface* SDLTest_ImagePrimitives | ( | void |  | ) |

Returns the Primitives test image as SDL_Surface.

Definition at line 491 of file SDL_test_imagePrimitives.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_testPrimitives().

{
SDL_Surface *surface = SDL_CreateRGBSurfaceFrom(
(void*)SDLTest_imagePrimitives.pixel_data,
SDLTest_imagePrimitives.width,
SDLTest_imagePrimitives.height,
SDLTest_imagePrimitives.bytes_per_pixel * 8,
SDLTest_imagePrimitives.width * SDLTest_imagePrimitives.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_imagePrimitives
static const SDLTest_SurfaceImage_t SDLTest_imagePrimitives
Definition: SDL_test_imagePrimitives.c:27
SDLTest_SurfaceImage_t::height
int height
Definition: SDL_test_images.h:52
SDLTest_SurfaceImage_t::width
int width
Definition: SDL_test_images.h:51
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37

## SDLTest_ImagePrimitivesBlend()

SDL_Surface* SDLTest_ImagePrimitivesBlend | ( | void |  | ) |

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
surface
EGLSurface surface
Definition: eglext.h:248
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:69
SDLTest_imagePrimitivesBlend
static const SDLTest_SurfaceImage_t SDLTest_imagePrimitivesBlend
Definition: SDL_test_imagePrimitivesBlend.c:27
SDL_CreateRGBSurfaceFrom
#define SDL_CreateRGBSurfaceFrom
Definition: SDL_dynapi_overrides.h:445
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:37