Class NinePatch

java.lang.Object
gaiasky.util.gdx.g2d.NinePatch

public class NinePatch extends Object
A 3x3 grid of texture regions. Any of the regions may be omitted. Padding may be set as a hint on how to inset content on top of the ninepatch (by default the eight "edge" textures of the nine-patch define the padding). When drawn the eight "edge" patches will not be scaled, only the interior patch will be scaled.

NOTE: This class expects a "post-processed" nine-patch, and not a raw ".9.png" texture. That is, the textures given to this class should not include the meta-data pixels from a ".9.png" that describe the layout of the ninepatch over the interior of the graphic. That information should be passed into the constructor either implicitly as the size of the individual patch textures, or via the left, right, top, bottom parameters to NinePatch(Texture, int, int, int, int) or NinePatch(TextureRegion, int, int, int, int).

A correctly created TextureAtlas is one way to generate a post-processed nine-patch from a ".9.png" file.