summaryrefslogtreecommitdiff
path: root/include/blender/blender.h
diff options
context:
space:
mode:
authorpacien2017-11-28 19:01:51 +0100
committerpacien2017-11-28 19:01:51 +0100
commit987835afe8fc5d46cb3a6359ec80c9f035e72801 (patch)
treee93ddebbfc15900f9307df446e420c086f8a2ebd /include/blender/blender.h
parentac60669cd3a93312f0ff186055e61a5e3fb5fcdd (diff)
downloadmorpher-987835afe8fc5d46cb3a6359ec80c9f035e72801.tar.gz
Add module spec headers
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'include/blender/blender.h')
-rw-r--r--include/blender/blender.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/blender/blender.h b/include/blender/blender.h
new file mode 100644
index 0000000..356c68e
--- /dev/null
+++ b/include/blender/blender.h
@@ -0,0 +1,42 @@
1#ifndef UPEM_MORPHING_BLENDER
2#define UPEM_MORPHING_BLENDER
3
4/**
5 * File: blender.h
6 * Will it blend? That is the question.
7 */
8
9#include "common/time.h"
10#include "blender/canvas.h"
11#include "blender/color.h"
12#include "morpher/morpher.h"
13
14/**
15 * Function: blender_blend_canvas
16 * Blends two canvas by applying the given morphing at the requested time frame.
17 *
18 * Parameters:
19 * *canvas - pointer to the canvas to paint
20 * *source - source image
21 * *target - target image
22 * *morphing - morphing transform to apply
23 * frame - the interpolation distance from the origin canvas [0;1]
24 */
25void blender_blend_canvas(Canvas *canvas, Canvas *source, Canvas *target, Morphing *morphing, TimeVector frame);
26
27/**
28 * Function: blender_blend_colors
29 * Properly blends two coloured pixels, interpolated at the given time frame.
30 * (https://www.youtube.com/watch?v=LKnqECcg6Gw)
31 *
32 * Parameters:
33 * origin - the origin colour
34 * target - the target colour
35 * frame - the interpolation distance from the origin colour [0;1]
36 *
37 * Returns:
38 * The blended coloured pixel
39 */
40Color blender_blend_colors(Color origin, Color target, TimeVector frame);
41
42#endif