PackingOptions

open class PackingOptions(var allowRotation: Boolean = false, var paddingHorizontal: Int = 2, var paddingVertical: Int = 2, var outputPagesAsPowerOfTwo: Boolean = true, var maxWidth: Int = 4096, var maxHeight: Int = 4096, var edgeBorder: Int = 2, var bleed: Boolean = true, var bleedIterations: Int = 2, var extrude: Int = 1)

Author

Colton Daily

Constructors

Link copied to clipboard
fun PackingOptions(allowRotation: Boolean = false, paddingHorizontal: Int = 2, paddingVertical: Int = 2, outputPagesAsPowerOfTwo: Boolean = true, maxWidth: Int = 4096, maxHeight: Int = 4096, edgeBorder: Int = 2, bleed: Boolean = true, bleedIterations: Int = 2, extrude: Int = 1)

Functions

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
var allowRotation: Boolean = false

If true, images will be rotated 90 degrees in an attempt to pack more efficiently.

Link copied to clipboard
var bleed: Boolean = true

If true, RGB values for transparent pixels are set based on the RGB values of the nearest non-transparent pixels. This prevents filtering artifacts when RGB values are sampled for transparent pixels.

Link copied to clipboard

The amount of bleed iterations that should be performed. Use greater values such as 4 or 8 if you’re having artifacts when downscaling your textures.

Link copied to clipboard
var edgeBorder: Int = 2
Link copied to clipboard
var extrude: Int = 1

Repeats the packed image pixels at the border. Does not change the packed image size.

Link copied to clipboard
var maxHeight: Int = 4096
Link copied to clipboard
var maxWidth: Int = 4096
Link copied to clipboard

If true, pages will have power of two dimensions.

Link copied to clipboard

Number of pixels between packed images horizontally

Link copied to clipboard

Number of pixels between packed images vertically