Fix incorrect border alignment on ninepatch images
Fixes: #111
The borders were incorrectly swapped along the y-axis. This PR corrects their orientation.
This brings to light an issue with the current implementation, though, that I'm unsure how to fix. The borders of the nine patch are warped compared to the center of the image. This is likely due to the squishing of the edges' UVs so that they can fit their individual quads.
Source

Result
I'm not sure about the warping, but I suspect you are right. Ideally we should likely use an array texture here. That way we can keep UV's between 0-1 and also apply wrapping or repeating of textures.
Ideally we should likely use an array texture here.
Not something I’m too familiar with. Should we make a separate issue for that?
Ideally we should likely use an array texture here.
Not something I’m too familiar with. Should we make a separate issue for that?
Yeah! Is the warping an existing issue?
Yeah! Is the warping an existing issue?
I haven't tested it, but I’m guessing it is. I can run a test later today to verify that it existed before this fix.
Yeah! Is the warping an existing issue?
I haven't tested it, but I’m guessing it is. I can run a test later today to verify that it existed before this fix.
It also kinda looks like the nine patch border size is wrong. It should match the size in pixels of the most extreme corner. This is hard to do because things are split into 9 parts. So for the top with the blue "bar" it'll look wrong. Unity has different options which allow you to change how the 9 parts behave.