#is there a different way of splitting a

1 messages · Page 1 of 1 (latest)

cloud sable
#

.

#

Alright

#

So

#

Graphics#setClip will allow you to set a clip

#

you most likely want Graphics#setClip(in, int, int, int)

carmine anvil
#

so Im currently doing it with canvas.drawImage(int, int, Image); and I use BufferedImage as image

cloud sable
#

mhm

#

Now, why do you want to not use BufferedImage#getSubImage

carmine anvil
#

so canvas.drawImage is for one map, so I can have an Image on a map. now I have a wall of 7x4 item frames and I want to cut one big image into 7x4 parts to display it on a big wall

cloud sable
#

yep

#

alright

#

so

#
BufferedImage myImage = //...
for(int x = 0; x < mapsX; x++) {
  for(int y = 0; y < mapsY; y++) {
    Map map = maps[mapsX * mapsY + mapsX];
    BufferedImage subImage = myImage.getSubImage(x * 128, y * 128, 128, 128);
    // Draw sub image on map
  }
}
#

something like that

carmine anvil
#

yea, and my question was if there is any better way of doing it, like an method in paper/spigot for maps

cloud sable
#

I don't really know, don't work with maps