NinePatch
Creates a ninepatch by slicing up the TextureSlice into nine patches which produces clean panels of any size, based on a small texture by splitting it into a 3x3 grid. The drawn, the texture tiles the textures sides horizontally or vertically and the center on both axes but doesn't scale or tile the corners.
Author
Colton Daily
Parameters
slice
the slice to convert into a nine patch
left
amount of pixels from the left edge
right
amount of pixels from the right edge
top
amount of pixels from the top edge
bottom
amount of pixels from the bottom edge
Constructors
Types
Functions
Link copied to clipboard
fun draw(batch: Batch, x: Float, y: Float, width: Float, height: Float, originX: Float = 0.0f, originY: Float = 0.0f, scaleX: Float = 1.0f, scaleY: Float = 1.0f, rotation: Angle = Angle.ZERO, color: Color = Color.WHITE, srcX: Float = 0.0f, srcY: Float = 0.0f, srcWidth: Float = width, srcHeight: Float = height)