summaryrefslogtreecommitdiff
path: root/test/blender/blender.c
diff options
context:
space:
mode:
authorAdam NAILI2017-12-28 16:23:17 +0100
committerAdam NAILI2017-12-28 16:23:17 +0100
commit9e4eb30f33867bcb37d5accfb5588cfb3b450f90 (patch)
tree57cc389a1c302d8278246fb8334ada216be82a01 /test/blender/blender.c
parentaaf57e5ee1e0cf74afdbdf56293f1afd7e79e6b0 (diff)
parent426ddbdd27d21383a3870980f9b787a8c58237aa (diff)
downloadmorpher-9e4eb30f33867bcb37d5accfb5588cfb3b450f90.tar.gz
Merge remote-tracking branch 'origin/master' into gui
Diffstat (limited to 'test/blender/blender.c')
-rw-r--r--test/blender/blender.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/test/blender/blender.c b/test/blender/blender.c
deleted file mode 100644
index f42322f..0000000
--- a/test/blender/blender.c
+++ /dev/null
@@ -1,29 +0,0 @@
1#include "blender/blender.h"
2#include <assert.h>
3
4static void test_canvas_blending() {
5 Morphing *morphing;
6 Canvas origin, target, result;
7 CartesianVector sample_point = {13, 17};
8
9 morphing = morphing_create(64, 64);
10 canvas_init(&origin, 64, 64);
11 canvas_init(&target, 64, 64);
12 canvas_init(&result, 64, 64);
13
14 canvas_set_pixel(&origin, sample_point, (Color) {{0xFF, 0xED, 0x00, 0x00}});
15 canvas_set_pixel(&target, sample_point, (Color) {{0x00, 0x47, 0xAB, 0x00}});
16
17 blender_blend_canvas(&result, &origin, &target, morphing, 0.125);
18 assert(color_equals(canvas_get_pixel(&result, sample_point), (Color) {{0xEE, 0xDF, 0x3C, 0x00}}));
19
20 canvas_free(&result);
21 canvas_free(&target);
22 canvas_free(&origin);
23 morphing_destroy(morphing);
24}
25
26int main(int argc, char **argv) {
27 test_canvas_blending();
28 return 0;
29}