This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 91989ac6cef96d62797a104a2f99cca17f6151de (commit) from d10318c0369619faa73b93abe840ea8e67cb5a52 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/91989ac6cef96d62797a104a2f99cca17f615...
commit 91989ac6cef96d62797a104a2f99cca17f6151de Author: Cyril Hrubis metan@ucw.cz Date: Sun Dec 11 19:27:59 2011 +0100
core: Add more tests for GP_MIX_PIXELS.
diff --git a/include/core/GP_MixPixels.gen.h.t b/include/core/GP_MixPixels.gen.h.t index ab611aa..2ad33a8 100644 --- a/include/core/GP_MixPixels.gen.h.t +++ b/include/core/GP_MixPixels.gen.h.t @@ -20,8 +20,8 @@ Macros to mix two pixels accordingly to percentage. %% for c in pt.chanslist GP_Pixel {{ c[0] }}; - {{ c[0] }} = GP_Pixel_GET_{{ c[0] }}_{{ pt.name }}(pix1) * perc; - {{ c[0] }} += GP_Pixel_GET_{{ c[0] }}_{{ pt.name }}(pix2) * (255 - perc); + {{ c[0] }} = GP_Pixel_GET_{{ c[0] }}_{{ pt.name }}(pix1) * (perc); + {{ c[0] }} += GP_Pixel_GET_{{ c[0] }}_{{ pt.name }}(pix2) * (255 - (perc)); {{ c[0] }} = ({{ c[0] }} + 128) / 255; %% endfor diff --git a/tests/core/GP_MixPixels.test.gen.c.t b/tests/core/GP_MixPixels.test.gen.c.t index ffb9d6d..cb2a6fb 100644 --- a/tests/core/GP_MixPixels.test.gen.c.t +++ b/tests/core/GP_MixPixels.test.gen.c.t @@ -34,4 +34,18 @@ GP_SUITE(GP_MixPixels) } %% endcall
+%% call(pt) test_for_all_pixeltypes("MixPixelsSymmetry_via", + opts="loop_start=0, loop_end=4", + palette=False) + GP_Pixel p1 = GP_RGBToPixel(0, 124, 12, GP_PIXEL_{{ pt.name }}); + GP_Pixel p2 = GP_RGBToPixel(255, 99, 0, GP_PIXEL_{{ pt.name }}); + GP_Pixel p3, p4; + int i; + for (i = 0; i < 256; i++) { + p3 = GP_MIX_PIXELS_{{ pt.name }}(p1, p2, i); + p4 = GP_MIX_PIXELS_{{ pt.name }}(p2, p1, 255 - i); + GP_CHECK_EqualColors(p3, GP_PIXEL_{{ pt.name }}, p4, GP_PIXEL_{{ pt.name }}); + } +%% endcall + %% endblock body
-----------------------------------------------------------------------
Summary of changes: include/core/GP_MixPixels.gen.h.t | 4 ++-- tests/core/GP_MixPixels.test.gen.c.t | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.