MCPcopy Create free account
hub / github.com/Card-Forge/forge / drawRepeatingImage

Method drawRepeatingImage

forge-gui-mobile/src/forge/Graphics.java:1395–1407  ·  view source on GitHub ↗
(Texture image, float x, float y, float w, float h)

Source from the content-addressed store, hash-verified

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) {

Callers 2

drawMethod · 0.80

Calls 7

startClipMethod · 0.95
adjustXMethod · 0.95
adjustYMethod · 0.95
endClipMethod · 0.95
getWidthMethod · 0.65
getHeightMethod · 0.65
drawMethod · 0.65

Tested by

no test coverage detected