Differences From
Artifact [a9a0d17ab5]:
11 11 local bracket = false
12 12 if self.combine then
13 13 str = string.format('[combine:%sx%s', self.w, self.h)
14 14 for _,i in pairs(self.atop) do
15 15 str = str .. string.format(':%s,%s=(%s)', i.at.x, i.at.y, i.img:render())
16 16 end
17 17 else
18 + for _,i in pairs(self.atop) do
19 + str = '(' .. i.img:render() .. ')^' .. str
20 + end
18 21 if str ~= '' then
19 22 str = str .. '('
20 23 bracket = true
21 24 end
22 - for _,i in pairs(self.atop) do
23 - str = '(' .. i.img:render() .. ')^' .. str
24 - end
25 25 str = str .. self.string
26 26 end
27 27 for _,e in pairs(self.fx) do
28 28 str = str .. '^[' .. e
29 29 -- be sure to escape ones that take arguments
30 30 -- correctly!
31 31 end
................................................................................
120 120 fx = lib.tbl.append(self.fx, {'transform' .. tostring(kind)})
121 121 })
122 122 end;
123 123
124 124 glow = function(self,color) return self:blit(self:multiply(color)) end;
125 125 };
126 126
127 - construct = function(file, w, h) return {
128 - string = file;
129 - atop = {};
130 - fx = {};
131 - combine = w and h and true or nil;
132 - } end;
127 + construct = function(file, w, h)
128 + return {
129 + string = file;
130 + atop = {};
131 + fx = {};
132 + combine = w and h and true or nil;
133 + }
134 + end;
133 135 }
134 136 return image