src/test/SDL_test_imagePrimitivesBlend.c
changeset 6763 9cbd31a3450b
parent 6762 c680e085a5f2
child 6885 700f1b25f77f
     1.1 --- a/src/test/SDL_test_imagePrimitivesBlend.c	Thu Dec 20 08:50:36 2012 -0800
     1.2 +++ b/src/test/SDL_test_imagePrimitivesBlend.c	Sat Dec 22 16:06:55 2012 -0800
     1.3 @@ -667,3 +667,28 @@
     1.4    "\377\377\377\377\377\377\377\377\324X2\377\377\377\333bB\377\377\377",
     1.5  };
     1.6  
     1.7 +/**
     1.8 + * \brief Returns the PrimitivesBlend test image as SDL_Surface.
     1.9 + */
    1.10 +SDL_Surface *SDLTest_ImagePrimitivesBlend()
    1.11 +{
    1.12 +   SDL_Surface *surface = SDL_CreateRGBSurfaceFrom( 
    1.13 +        (void*)SDLTest_imagePrimitivesBlend.pixel_data,
    1.14 +        SDLTest_imagePrimitivesBlend.width, 
    1.15 +        SDLTest_imagePrimitivesBlend.height, 
    1.16 +        SDLTest_imagePrimitivesBlend.bytes_per_pixel * 8, 
    1.17 +        SDLTest_imagePrimitivesBlend.width * SDLTest_imagePrimitivesBlend.bytes_per_pixel,
    1.18 +#if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
    1.19 +         0xff000000, /* Red bit mask. */
    1.20 +         0x00ff0000, /* Green bit mask. */
    1.21 +         0x0000ff00, /* Blue bit mask. */
    1.22 +         0x000000ff  /* Alpha bit mask. */
    1.23 +#else
    1.24 +         0x000000ff, /* Red bit mask. */
    1.25 +         0x0000ff00, /* Green bit mask. */
    1.26 +         0x00ff0000, /* Blue bit mask. */
    1.27 +         0xff000000  /* Alpha bit mask. */
    1.28 +#endif
    1.29 +         );
    1.30 +   return surface;
    1.31 +}