MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / blendColor

Method blendColor

Source/GameToolbox/conv.cpp:186–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186ax::Color3B GameToolbox::blendColor(const ax::Color3B& color1, const ax::Color3B& color2, float ratio)
187{
188 uint8_t r = color1.r * (1 - ratio) + color2.r * ratio;
189 uint8_t g = color1.g * (1 - ratio) + color2.g * ratio;
190 uint8_t b = color1.b * (1 - ratio) + color2.b * ratio;
191
192 return ax::Color3B(r, g, b);
193}
194
195void GameToolbox::drawFromRect(ax::Rect const& rect, ax::Color4B color, ax::DrawNode* drawNode)
196{

Callers

nothing calls this directly

Calls 1

Color3BClass · 0.85

Tested by

no test coverage detected