My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
SDL_test_compare.h File Reference
#include "SDL.h"
#include "SDL_test_images.h"
#include "begin_code.h"
#include "close_code.h"

Go to the source code of this file.

Functions

int SDLTest_CompareSurfaces (SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error)
 Compares a surface and with reference image data for equality. More...
 

Detailed Description

Include file for SDL test framework.

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

Function Documentation

int SDLTest_CompareSurfaces ( SDL_Surface surface,
SDL_Surface referenceSurface,
int  allowable_error 
)

Compares a surface and with reference image data for equality.

Parameters
surfaceSurface used in comparison
referenceSurfaceTest Surface used in comparison
allowable_errorAllowable difference (squared) in blending accuracy.
Returns
0 if comparison succeeded, >0 (=number of pixels where comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ.