-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransformation.hpp
More file actions
47 lines (37 loc) · 921 Bytes
/
transformation.hpp
File metadata and controls
47 lines (37 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
** EPITECH PROJECT, 2025
** video-code
** File description:
** color
*/
#pragma once
#include <nlohmann/json.hpp>
#include "input/Iterable.hpp"
#include "vm/Register.hpp"
using json = nlohmann::json;
#define transformation(t) void t(IterableInput input, const json::object_t &args)
namespace transformation
{
// Color
transformation(grayscale);
transformation(fade);
// Position
transformation(translate);
transformation(move);
// Other
transformation(repeat);
/***
TODO: transformation(concat);
TODO: transformation(merge);
***/
static const std::map<std::string, std::function<void(IterableInput input, const json::object_t &args)>> map{
// Color
{"grayscale", grayscale},
{"fade", fade},
// Position
{"translate", translate},
{"move", move},
// Other
{"repeat", repeat},
};
};