MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / getImage

Method getImage

sources/effects/Animation4Music_PulseRed.cpp:55–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53};
54
55bool Animation4Music_PulseRed::getImage(Image<ColorRgb>& newImage)
56{
57 if (hasResult == nullptr)
58 return false;
59
60 bool newData = false;
61 auto r = hasResult(this, _internalIndex, NULL, NULL, &newData, &_oldMulti);
62
63 if (r == nullptr || !newData)
64 return false;
65
66 int value = r->getValue(_oldMulti);
67
68 if (value < 0)
69 return false;
70
71 ColorRgb selected(value, 0, 0);
72 newImage.fastBox(0, 0, newImage.width() - 1, newImage.height() - 1, selected.Red(), selected.Green(), selected.Blue());
73
74 return true;
75};
76
77bool Animation4Music_PulseRed::isRegistered = hyperhdr::effects::REGISTER_EFFECT(Animation4Music_PulseRed::getDefinition());

Callers

nothing calls this directly

Calls 7

getValueMethod · 0.80
RedMethod · 0.80
GreenMethod · 0.80
BlueMethod · 0.80
fastBoxMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected