| 245 | } |
| 246 | |
| 247 | void LabelAtlas::updateColor() |
| 248 | { |
| 249 | if (_textureAtlas) |
| 250 | { |
| 251 | Color4B color4(_displayedColor.r, _displayedColor.g, _displayedColor.b, _displayedOpacity); |
| 252 | if (_isOpacityModifyRGB) |
| 253 | { |
| 254 | color4.r *= _displayedOpacity / 255.0f; |
| 255 | color4.g *= _displayedOpacity / 255.0f; |
| 256 | color4.b *= _displayedOpacity / 255.0f; |
| 257 | } |
| 258 | auto quads = _textureAtlas->getQuads(); |
| 259 | ssize_t length = _string.length(); |
| 260 | for (int index = 0; index < length; index++) |
| 261 | { |
| 262 | quads[index].bl.colors = color4; |
| 263 | quads[index].br.colors = color4; |
| 264 | quads[index].tl.colors = color4; |
| 265 | quads[index].tr.colors = color4; |
| 266 | _textureAtlas->updateQuad(quads[index], index); |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | // CCLabelAtlas - draw |
| 272 | #if AX_LABELATLAS_DEBUG_DRAW |
nothing calls this directly
no test coverage detected