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