Unify drawing of layers and interactions into "drawables".

This commit is contained in:
2018-04-06 13:06:03 +02:00
parent 9dc4f1546d
commit 2138ce440a
14 changed files with 63 additions and 54 deletions

16
src/fmri/Drawable.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "Drawable.hpp"
void fmri::Drawable::patchTransparancy()
{
if constexpr (std::tuple_size<Color>::value < 4) {
// Not compiling with alpha support
return;
}
const auto alpha = getAlpha();
const auto end = colorBuffer.end();
for (auto it = colorBuffer.begin(); it != end; ++it) {
(*it)[3] = alpha;
}
}