Hi guys,
I'm trying to use Nineslice to create a very simple sizable window.
I defined this image as the Nineslice. The red center is the part defined as the center slice in the code.
Here's the code where I define the Nineslice and draw the window:
local DialogueWindowSlice = gfx.nineSlice.new('assets/dialogue-window-slice.png', 4, 4, 3, 3)
DialogueWindowSlice:drawInRect((10), (10), 250, 42) -- Draws window
here's what I get:
I was expecting to get this:
I don't understand the one pixel space between the bottom center slices.
So trying to debug I defined the center slice as one pixel less wide, like this:
local DialogueWindowSlice = gfx.nineSlice.new('assets/dialogue-window-slice.png', 4, 4, 2, 3)
This gives me the result I want. I should be happy about it but I don't understand the logic of it.
Can someone exlain?
Thanks
Stephan