summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpacien2017-12-28 01:41:24 +0100
committerpacien2017-12-28 01:41:24 +0100
commit0b3608c819b809ae599844bb9188c59564620868 (patch)
tree2f0460ab7ffc305de366ccce54dc707c9a2be536 /include
parentfa154af5a72964931bae432dbb96abf45465e6cb (diff)
downloadmorpher-0b3608c819b809ae599844bb9188c59564620868.tar.gz
Remove previous impl. files
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'include')
-rw-r--r--include/blender/canvas.h79
-rw-r--r--include/blender/color.h46
2 files changed, 0 insertions, 125 deletions
diff --git a/include/blender/canvas.h b/include/blender/canvas.h
deleted file mode 100644
index aae217d..0000000
--- a/include/blender/canvas.h
+++ /dev/null
@@ -1,79 +0,0 @@
1#ifndef UPEM_MORPHING_CANVAS
2#define UPEM_MORPHING_CANVAS
3
4/**
5 * File: canvas.h
6 *
7 * See also:
8 * Freedom, according to Bob Ross
9 */
10
11#include <MLV/MLV_image.h>
12#include "common/geom.h"
13#include "color.h"
14
15/**
16 * Type: Canvas
17 * Represents a fixed size RGBa pixel matrix.
18 */
19typedef struct {
20 MLV_Image *mlv;
21} Canvas;
22
23/**
24 * Function: canvas_init
25 * Initialises a canvas of the given size
26 *
27 * Parameters:
28 * *canvas - the canvas to initialise
29 * width - the width in pixels
30 * height - the height in pixels
31 */
32void canvas_init(Canvas *canvas, IntVector width, IntVector height);
33
34/**
35 * Function: canvas_free
36 * Frees all memory allocated to a canvas.
37 *
38 * Parameters:
39 * *canvas - the canvas to destroy
40 */
41void canvas_free(Canvas *canvas);
42
43/**
44 * Function: canvas_set_pixel
45 * Sets the pixel colour at the given coordinates.
46 *
47 * Parameters:
48 * *canvas - the canvas to alter
49 * position - the cartesian coordinates of the pixel to set
50 * color - the new colour to set
51 */
52void canvas_set_pixel(Canvas *canvas, CartesianVector position, Color color);
53
54/**
55 * Function: canvas_get_pixel
56 * Returns the colour of the pixel at the given position.
57 *
58 * Parameters:
59 * *canvas - the base canvas
60 * position - the position in cartesian coordinates
61 *
62 * Returns:
63 * The colour of the requested pixel
64 */
65Color canvas_get_pixel(Canvas *canvas, CartesianVector position);
66
67/**
68 * Function: canvas_get_dim
69 * Returns the size (in pixels) of the given canvas.
70 *
71 * Parameters:
72 * *canvas - the canvas
73 *
74 * Returns:
75 * The size of the canvas
76 */
77CartesianVector canvas_get_dim(Canvas *canvas);
78
79#endif
diff --git a/include/blender/color.h b/include/blender/color.h
deleted file mode 100644
index 1fef2cf..0000000
--- a/include/blender/color.h
+++ /dev/null
@@ -1,46 +0,0 @@
1#ifndef UPEM_MORPHING_COLOR
2#define UPEM_MORPHING_COLOR
3
4/**
5 * File: color.h
6 *
7 * See also:
8 * A rainbow
9 */
10
11#include <MLV/MLV_color.h>
12#include <stdbool.h>
13
14/**
15 * Type: ColorComponent
16 * Represents a single colour component of 32-bits RGBa tuple.
17 */
18typedef uint8_t ColorComponent;
19
20/**
21 * Type: ColorPixel
22 * Represents a single RGBa coloured pixel.
23 * Compatible with the libMLV representation.
24 */
25typedef union {
26 struct {
27 ColorComponent r, g, b, a;
28 } rgba;
29
30 MLV_Color mlv;
31} Color;
32
33/**
34 * Function: color_equals
35 * Compares the supplied colors.
36 *
37 * Parameters:
38 * c1 - the first color
39 * c2 - the second color
40 *
41 * Returns:
42 * T(c1 is the same color as c2)
43 */
44bool color_equals(Color c1, Color c2);
45
46#endif