Today I ran into a gotcha of libgdx. I was trying to render a NinePatch packed with texture packer by constructing a NinePatch using this:
new NinePatch(assetManaget.get("pack.atlas", TextureAtlas.class).findRegion("path/to/ninepatch"));
Then I tried to render the object using its draw() method. Didn't work. Instead, the NinePatch image was just stretched.
Then I read the documentation about the constructor of new NinePatch(TextureRegion)
Construct a degenerate "nine" patch with only a center component.
What? This is obviously not what I was expecting.
Turned out that the proper way to do this is:
assetManaget.get("pack.atlas", TextureAtlas.class).createPatch("path/to/ninepatch");
Thank you! This saved me lots of grief!