Enlightenment CVS committal Author : cedric Project : e17 Module : libs/eet
Dir : e17/libs/eet/src/tests Modified Files: eet_suite.c Log Message: Add eet_data_image_read_to_surface and eet_data_image_decode_to_surface. This functions provide a way to support tiles with eet. They also give the possibility to directly decompress eet image inside an engine surface. =================================================================== RCS file: /cvs/e/e17/libs/eet/src/tests/eet_suite.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- eet_suite.c 16 May 2008 15:07:03 -0000 1.1 +++ eet_suite.c 2 Jun 2008 16:01:18 -0000 1.2 @@ -903,10 +903,21 @@ fail_if(compress != 0); fail_if(lossy != 0); - data = eet_data_image_read(ef, EET_TEST_FILE_IMAGE "0", &w, &h, &alpha, &compress, &quality, &lossy); + data = malloc(w * h * 4); fail_if(data == NULL); - fail_if(w != test_noalpha.w); - fail_if(h != test_noalpha.h); + result = eet_data_image_read_to_surface(ef, EET_TEST_FILE_IMAGE "0", 4, 4, data, 2, 2, w * 4, &alpha, &compress, &quality, &lossy); + fail_if(result != 1); + fail_if(alpha != test_noalpha.alpha); + fail_if(compress != 0); + fail_if(quality != 100); + fail_if(lossy != 0); + fail_if(data[0] != test_noalpha.color[4 + 4 * w]); + free(data); + + data = malloc(w * h * 4); + fail_if(data == NULL); + result = eet_data_image_read_to_surface(ef, EET_TEST_FILE_IMAGE "0", 0, 0, data, w, h, w * 4, &alpha, &compress, &quality, &lossy); + fail_if(result != 1); fail_if(alpha != test_noalpha.alpha); fail_if(compress != 0); fail_if(quality != 100); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs