public static NinePatchDrawable createNinePatchDrawableFromAtlas(ResolutionHelper resolutionHelper, String imageName, TextureAtlas textureAtlas, int patchOffsetLeft, int patchOffsetRight, int patchOffsetTop, int patchOffsetBottom) { NinePatchDrawable ninePatchDrawable = new NinePatchDrawable(); TextureRegion region = textureAtlas.findRegion(imageName); NinePatch patch = new NinePatch(region, patchOffsetLeft, patchOffsetRight, patchOffsetTop, patchOffsetBottom); patch.scale(resolutionHelper.getSizeMultiplier(), resolutionHelper.getSizeMultiplier()); ninePatchDrawable.setPatch(patch); return ninePatchDrawable; } }