Skip to content

Commit 66ed68f

Browse files
committed
Fixed issue with padding not being adding to the quad's position for dynamic atlases
1 parent 9af11ba commit 66ed68f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

treeNode.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ treeNode.draw = function(self, quads, width, height, extrude, padding)
6969
local iwidth, iheight = img:getDimensions()
7070
local extrudeQuad = lg.newQuad(-extrude, -extrude, iwidth+extrude*2, iheight+extrude*2, iwidth, iheight)
7171
lg.draw(img, extrudeQuad, self.x + padding, self.y + padding)
72-
quads[self.image.id] = lg.newQuad(self.x+extrude, self.y+extrude, iwidth, iheight, width, height)
72+
quads[self.image.id] = lg.newQuad(self.x+extrude+padding, self.y+extrude+padding, iwidth, iheight, width, height)
7373
elseif self[1] --[[ and self[2] ]] then
7474
self[1]:draw(quads, width, height, extrude, padding)
7575
self[2]:draw(quads, width, height, extrude, padding)

0 commit comments

Comments
 (0)