sliceWithBorder
fun Pixmap.sliceWithBorder(context: Context, sliceWidth: Int, sliceHeight: Int, border: Int = 1, mipmaps: Boolean = false): List<TextureSlice>
fun Texture.sliceWithBorder(context: Context, sliceWidth: Int, sliceHeight: Int, border: Int = 1, mipmaps: Boolean = false): List<TextureSlice>
Slice up the texture in a list of TextureSlice with the given size with an added border. This can be used to prevent atlas bleeding.
Parameters
context
the current context - used to prepare the newly created Texture.
sliceWidth
the width of each slice
sliceHeight
the height of each slice
border
the thickness of the border for each slice
mipmaps
use mipmaps or not for the new texture