fix some arg names
[lines.love.git] / icons.lua
blobe80f771aa2b785abd5a03083abbaa75b20d3495a
1 icon = {}
3 function icon.insert_drawing(button_params)
4 local x,y = button_params.x, button_params.y
5 App.color(Icon_color)
6 love.graphics.rectangle('line', x,y, 12,12)
7 love.graphics.line(4,y+6, 16,y+6)
8 love.graphics.line(10,y, 10,y+12)
9 end
11 function icon.hyperlink_decoration(button_params)
12 local x,y = button_params.x, button_params.y
13 App.color(Hyperlink_decoration_color)
14 love.graphics.line(x,y+Editor_state.line_height, x+button_params.w,y+Editor_state.line_height)
15 end
17 function icon.freehand(x, y)
18 love.graphics.line(x+4,y+7,x+5,y+5)
19 love.graphics.line(x+5,y+5,x+7,y+4)
20 love.graphics.line(x+7,y+4,x+9,y+3)
21 love.graphics.line(x+9,y+3,x+10,y+5)
22 love.graphics.line(x+10,y+5,x+12,y+6)
23 love.graphics.line(x+12,y+6,x+13,y+8)
24 love.graphics.line(x+13,y+8,x+13,y+10)
25 love.graphics.line(x+13,y+10,x+14,y+12)
26 love.graphics.line(x+14,y+12,x+15,y+14)
27 love.graphics.line(x+15,y+14,x+15,y+16)
28 end
30 function icon.line(x, y)
31 love.graphics.line(x+4,y+2, x+16,y+18)
32 end
34 function icon.manhattan(x, y)
35 love.graphics.line(x+4,y+20, x+4,y+2)
36 love.graphics.line(x+4,y+2, x+10,y+2)
37 love.graphics.line(x+10,y+2, x+10,y+10)
38 love.graphics.line(x+10,y+10, x+18,y+10)
39 end
41 function icon.polygon(x, y)
42 love.graphics.line(x+8,y+2, x+14,y+2)
43 love.graphics.line(x+14,y+2, x+18,y+10)
44 love.graphics.line(x+18,y+10, x+10,y+18)
45 love.graphics.line(x+10,y+18, x+4,y+12)
46 love.graphics.line(x+4,y+12, x+8,y+2)
47 end
49 function icon.rectangle(x, y)
50 love.graphics.line(x+4,y+8, x+4,y+16)
51 love.graphics.line(x+4,y+16, x+16,y+16)
52 love.graphics.line(x+16,y+16, x+16,y+8)
53 love.graphics.line(x+16,y+8, x+4,y+8)
54 end
56 function icon.square(x, y)
57 love.graphics.line(x+6,y+6, x+6,y+16)
58 love.graphics.line(x+6,y+16, x+16,y+16)
59 love.graphics.line(x+16,y+16, x+16,y+6)
60 love.graphics.line(x+16,y+6, x+6,y+6)
61 end
63 function icon.circle(x, y)
64 love.graphics.circle('line', x+10,y+10, 8)
65 end