Repository navigation
Expand file tree
/
Copy pathlogo.lua
More file actions
61 lines (53 loc) · 1.39 KB
/
Copy pathlogo.lua
File metadata and controls
61 lines (53 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
local w, h = 2048, 2048
local F = require "F"
fig { w, h,
font_size=h/8, text_anchor="middle",
}
local border_size = 64
fig {
rect {
x = border_size/2,
y = border_size/2,
width = w-2*border_size/2,
height = h-2*border_size/2,
rx = 2*border_size,
stroke = "#435488", stroke_width = border_size,
fill = "grey",
},
text "Fizz Buzz" {
x = w/2,
y = h/4,
},
rect {
x = w/4-64, width = w/2+2*64,
y = h/4-100, height = 64,
rx = 32,
fill = "red",
opacity = 0.7,
},
rect {
x = 128, width = w-2*128,
y = h/4+64, height = 64,
rx = 32,
fill = "#435488",
opacity = 0.7,
},
}
local function ix(i) return w/4 + (256+64)*(i-1) end
local function iy(i) return 896 + 256*(i-1) end
local names = string.words "LuaX ypp Panda Pandoc ..."
names:mapi(function(i, name)
fig {
text(name) { x = ix(i), y = iy(i) } {
fill = F.case(name) {
Pandoc = "darkgrey",
[F.Nil] = "white",
},
},
}
end)
fig {
text "yreq" { x=ix(2+2.1), y=iy(2), fill="white" },
text "bang" {transform=("translate(%d, %d) rotate(45)"):format(ix(1.0), iy(3.5))} { fill = "white" },
text "ninja" {transform=("translate(%d, %d) rotate(45)"):format(ix(0.5), iy(4.0))} { fill = "darkgrey" },
}