| 184 | } |
| 185 | |
| 186 | ax::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 | |
| 195 | void GameToolbox::drawFromRect(ax::Rect const& rect, ax::Color4B color, ax::DrawNode* drawNode) |
| 196 | { |