(Batch batch, float parentAlpha)
| 206 | |
| 207 | |
| 208 | public void drawLabel(Batch batch, float parentAlpha) { |
| 209 | validate(); |
| 210 | if (getStyle().background != null) { |
| 211 | batch.setColor(1, 1, 1, getColor().a); |
| 212 | float padding = getHeight() * 0.15f; |
| 213 | float paddingX = getStyle().font.getSpaceWidth() * 0.5f; |
| 214 | getStyle().background.draw(batch, getX() - paddingX, getY(), getWidth() + paddingX * 2, getHeight() + padding); |
| 215 | } |
| 216 | if (isStroke) { |
| 217 | strokeColor.a = getColor().a; |
| 218 | fontCache.tint(strokeColor); |
| 219 | for (int i = 0; i < dxs.length; i++) { |
| 220 | fontCache.setPosition(getX() + dxs[i] * strokeWidth, getY() + dys[i] * strokeWidth + strokeWidth); |
| 221 | fontCache.draw(batch); |
| 222 | } |
| 223 | fontCache.setPosition(getX(), getY() + strokeWidth); |
| 224 | fontCache.tint(getColor()); |
| 225 | fontCache.draw(batch); |
| 226 | } else { |
| 227 | fontCache.setPosition(getX(), getY() + strokeWidth); |
| 228 | fontCache.tint(getColor()); |
| 229 | fontCache.draw(batch); |
| 230 | } |
| 231 | } |
| 232 | } |
no test coverage detected