diff options
Diffstat (limited to 'test/blender')
-rw-r--r-- | test/blender/blender.c | 29 |
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 | |||
4 | static 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 | |||
26 | int main(int argc, char **argv) { | ||
27 | test_canvas_blending(); | ||
28 | return 0; | ||
29 | } | ||