ninePatchImages

fun ninePatchImages(resources: Resources, textureName: String, block: NinePatchImages.() -> Unit): NinePatchImages

Part of a DSL (Domain specific language) for loading nine patches. Example (taken from DemoNinePatch) :

val ninePatches = ninePatchImages(demoResources, "demoButtons.png") {
    ninePatch("normal", 1, 1, 98, 58, Edges(15f))
    ninePatch("hover", 101, 1, 98, 58, Edges(15f))
    ninePatch("armed", 201, 1, 98, 58, Edges(15f))
    ninePatch("selected", 301, 1, 98, 58, Edges(15f))
}

In this example, all nine-patches are the same size, and have the same edges, i.e. all the corner patches are 15x15 pixels.

You can retrieve one of the nine-patches like so :

val hoverNinePatch = ninePatches["hover"]