Hi, I’m having the same problem; space between sliced parts. I think it has to do with the way corona sdk scales the individual parts. I tried to set the sampling filter to either “nearest” or “linear” but problem persists.
Here’s the imagesheet:
Here’s the sheet info: (exported from TexturePacker)
SheetInfo.sheet = { frames = { { -- btn-green-up-1 x=90, y=45, width=8, height=8, }, { -- btn-green-up-2 x=2, y=45, width=76, height=8, }, { -- btn-green-up-3 x=80, y=45, width=8, height=8, }, { -- btn-green-up-4 x=90, y=2, width=8, height=30, }, { -- btn-green-up-5 x=2, y=2, width=76, height=30, }, { -- btn-green-up-6 x=80, y=2, width=8, height=30, }, { -- btn-green-up-7 x=90, y=34, width=8, height=9, }, { -- btn-green-up-8 x=2, y=34, width=76, height=9, }, { -- btn-green-up-9 x=80, y=34, width=8, height=9, }, }, sheetContentWidth = 100, sheetContentHeight = 55 }
And here’s the code:
local btn = widget.newButton{ id = "btn-start", width = 227, height = 44, emboss = false, font = "Arial", fontSize = 18, labelColor = { default = {0, 0, 0}, over = {255, 255, 255} }, labelYOffset = 2, label = "Play", sheet = self.sheet, topLeftFrame = skin:getFrameIndex("btn-green-up-1"), topMiddleFrame = skin:getFrameIndex("btn-green-up-2"), topRightFrame = skin:getFrameIndex("btn-green-up-3"), middleLeftFrame = skin:getFrameIndex("btn-green-up-4"), middleFrame = skin:getFrameIndex("btn-green-up-5"), middleRightFrame = skin:getFrameIndex("btn-green-up-6"), bottomLeftFrame = skin:getFrameIndex("btn-green-up-7"), bottomMiddleFrame = skin:getFrameIndex("btn-green-up-8"), bottomRightFrame = skin:getFrameIndex("btn-green-up-9"), topLeftOverFrame = skin:getFrameIndex("btn-green-up-1"), topMiddleOverFrame = skin:getFrameIndex("btn-green-up-2"), topRightOverFrame = skin:getFrameIndex("btn-green-up-3"), middleLeftOverFrame = skin:getFrameIndex("btn-green-up-4"), middleOverFrame = skin:getFrameIndex("btn-green-up-5"), middleRightOverFrame = skin:getFrameIndex("btn-green-up-6"), bottomLeftOverFrame = skin:getFrameIndex("btn-green-up-7"), bottomMiddleOverFrame = skin:getFrameIndex("btn-green-up-8"), bottomRightOverFrame = skin:getFrameIndex("btn-green-up-9") }
Here you can see a screengrab of the issue: