| 1393 | } |
| 1394 | |
| 1395 | public void drawRepeatingImage(Texture image, float x, float y, float w, float h) { |
| 1396 | if (image == null) |
| 1397 | return; |
| 1398 | if (startClip(x, y, w, h)) { //only render if clip successful, otherwise it will escape bounds |
| 1399 | int tilesW = (int) (w / image.getWidth()) + 1; |
| 1400 | int tilesH = (int) (h / image.getHeight()) + 1; |
| 1401 | batch.draw(image, adjustX(x), adjustY(y, h), |
| 1402 | image.getWidth() * tilesW, |
| 1403 | image.getHeight() * tilesH, |
| 1404 | 0, tilesH, tilesW, 0); |
| 1405 | } |
| 1406 | endClip(); |
| 1407 | } |
| 1408 | |
| 1409 | //draw vertically flipped image |
| 1410 | public void drawFlippedImage(Texture image, float x, float y, float w, float h) { |