Unify drawing of layers and interactions into "drawables".
This commit is contained in:
16
src/fmri/Drawable.cpp
Normal file
16
src/fmri/Drawable.cpp
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user