summaryrefslogtreecommitdiff
path: root/src/painter
diff options
context:
space:
mode:
Diffstat (limited to 'src/painter')
-rw-r--r--src/painter/canvas.c7
-rw-r--r--src/painter/color.c7
-rw-r--r--src/painter/rasterizer.c7
3 files changed, 21 insertions, 0 deletions
diff --git a/src/painter/canvas.c b/src/painter/canvas.c
index 306dc9c..478173d 100644
--- a/src/painter/canvas.c
+++ b/src/painter/canvas.c
@@ -1,6 +1,13 @@
1#include "painter/canvas.h" 1#include "painter/canvas.h"
2#include "common/mem.h" 2#include "common/mem.h"
3 3
4/**
5 * File: canvas.c
6 *
7 * Author:
8 * Pacien TRAN-GIRARD
9 */
10
4Canvas *canvas_create(IntVector width, IntVector height) { 11Canvas *canvas_create(IntVector width, IntVector height) {
5 Canvas *c = malloc_or_die(sizeof(Canvas)); 12 Canvas *c = malloc_or_die(sizeof(Canvas));
6 c->mlv = MLV_create_image(width, height); 13 c->mlv = MLV_create_image(width, height);
diff --git a/src/painter/color.c b/src/painter/color.c
index 65c4f20..bf03359 100644
--- a/src/painter/color.c
+++ b/src/painter/color.c
@@ -1,6 +1,13 @@
1#include "painter/color.h" 1#include "painter/color.h"
2#include <math.h> 2#include <math.h>
3 3
4/**
5 * File: color.c
6 *
7 * Author:
8 * Pacien TRAN-GIRARD
9 */
10
4static inline ColorComponent blend_component(ColorComponent origin, ColorComponent target, TimeVector frame) { 11static inline ColorComponent blend_component(ColorComponent origin, ColorComponent target, TimeVector frame) {
5 return (ColorComponent) round(sqrt((TIME_UNIT - frame) * pow(origin, 2) + frame * pow(target, 2))); 12 return (ColorComponent) round(sqrt((TIME_UNIT - frame) * pow(origin, 2) + frame * pow(target, 2)));
6} 13}
diff --git a/src/painter/rasterizer.c b/src/painter/rasterizer.c
index 1ba726c..f4b3b89 100644
--- a/src/painter/rasterizer.c
+++ b/src/painter/rasterizer.c
@@ -2,6 +2,13 @@
2#include <math.h> 2#include <math.h>
3#include <assert.h> 3#include <assert.h>
4 4
5/**
6 * File: rasterizer.c
7 *
8 * Author:
9 * Pacien TRAN-GIRARD
10 */
11
5static inline IntVector i(double (*f)(double, double), RealVector a, RealVector b) { 12static inline IntVector i(double (*f)(double, double), RealVector a, RealVector b) {
6 return (IntVector) floor(f(a, b)); 13 return (IntVector) floor(f(a, b));
7} 14}