ADG Lua 

ADG Lua Commit Details

Date:2013-04-07 12:34:19 (6 years 5 months ago)
Author:Nicola Fontana
Branch:master
Commit:9a8bbce9c1fc0293b9ddee3d0bc6197655c69fdd
Parents: 27133762954fcea2a616591267dfd480ceb050b3
Message:doc: refactored adg-web TeX

Changes:
Rdoc/web.tex → doc/adg-web.tex
Adoc/base.tex (full)
Mdoc/.gitignore (1 diff)
Mdoc/Makefile (1 diff)

File differences

doc/.gitignore
1
2
3
4
1
2
3
4
/web.aux
/web.log
/web.pdf
/web.png
/adg-web.aux
/adg-web.log
/adg-web.pdf
/adg-web.png
doc/Makefile
1
1
22
33
4
4
55
66
7
8
7
8
99
10
10
1111
all: web.png
all: adg-web.png
clean:
rm -f web.pdf web.png
rm -f adg-web.pdf adg-web.png
web.pdf: web.tex
pdflatex $<
adg-web.pdf: adg-web.tex base.tex
pdflatex adg-web.tex
web.png: web.pdf
adg-web.png: adg-web.pdf
convert -antialias -density 600 $< -flatten -resize 800x $@
doc/adg-web.tex
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
\input{base}
\begin{document}
\begin{tikzpicture}[->,>=stealth']
\node[state, minimum width=2cm, outer sep=2pt] (USER) at (0:5cm) {%
\textbf{USER}};
\node[stage] (PHP) at (72:5cm) {%
\stage{PHP}{%
\item SilverStripe
\item silverstripe-adg
\item Piston.php}};
\node[stage] (LUA) at (144:5cm) {%
\stage{Lua}{%
\item adg-web.lua
\item piston.lua}};
\node[stage] (ADG) at (216:5cm) {%
\stage{ADG canvas}{%
\item libadg-1.so
\item libcpml-1.so}};
\node[stage] (CAIRO) at (288:5cm) {%
\stage{Cairo library}{%
\item libcairo.so
\item Pango
\item FreeType
\item FontConfig}};
\path (USER) edge[bend left=-18] node[above right]
{\textit{HTTP request}} (PHP);
\path (PHP) edge[bend left=-18] node[above left]
{\texttt{passthru()}} (LUA);
\path (LUA) edge[bend left=-18] node[left]
{\textit{LGI bindings}} (ADG);
\path (ADG) edge[bend left=-18] node[below left]
{\textit{API calls}} (CAIRO);
\path (CAIRO) edge[bend left=-18] node[below right]
{\textit{PNG image}} (USER);
\path (PHP) edge[bend left=-18] node[below left]
{\textit{HTML page}} (USER);
\path (LUA) edge[bend left=-18] node[above right]
{\textit{LGI bindings}} (CAIRO);
\end{tikzpicture}
\end{document}
doc/base.tex
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
\documentclass[border=11pt]{standalone}
\usepackage{tikz,enumitem}
\usetikzlibrary{arrows,automata,calc,positioning}
\tikzset{
every edge/.style={
draw=black,
thick,
},
state/.style={
anchor=center,
circle,
draw=black,
thick,
minimum height=2cm,
inner sep=8pt,
outer sep=2pt
},
stage/.style={
anchor=center,
rectangle,
rounded corners,
draw=black,
thick,
inner sep=8pt,
outer sep=2pt
},
}
\newcommand\stage[2]{%
\parbox{3cm}{%
\textbf{#1}\vspace{2pt}%
\begin{itemize}[noitemsep,nosep,leftmargin=1.5em,labelsep=4pt]
#2
\end{itemize}}}
doc/web.tex
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
\documentclass[border=11pt]{standalone}
\usepackage{tikz,enumitem}
\usetikzlibrary{arrows,automata,calc,positioning}
\tikzset{
stage/.style={
node distance=3cm,
anchor=center,
rectangle,
rounded corners,
draw=black, thick,
minimum height=2em,
inner sep=8pt,
outer sep=2pt
},
}
\newcommand\stage[2]{%
\parbox{3cm}{%
\textbf{#1}\vspace{2pt}%
\begin{itemize}[noitemsep,nosep,leftmargin=1.5em,labelsep=4pt]
#2
\end{itemize}}}
\begin{document}
\begin{tikzpicture}[->,>=stealth']
\node[state, minimum width=2cm, outer sep=2pt] (USER) at (0:5cm) {%
\textbf{USER}};
\node[stage] (PHP) at (72:5cm) {%
\stage{PHP}{%
\item SilverStripe
\item silverstripe-adg
\item Piston.php}};
\node[stage] (LUA) at (144:5cm) {%
\stage{Lua}{%
\item adg-web.lua
\item piston.lua}};
\node[stage] (ADG) at (216:5cm) {%
\stage{ADG canvas}{%
\item libadg-1.so
\item libcpml-1.so}};
\node[stage] (CAIRO) at (288:5cm) {%
\stage{Cairo library}{%
\item libcairo.so
\item Pango
\item FreeType
\item FontConfig}};
\path (USER) edge[bend left=-18] node[above right]
{\textit{HTTP request}} (PHP);
\path (PHP) edge[bend left=-18] node[above left]
{\texttt{passthru()}} (LUA);
\path (LUA) edge[bend left=-18] node[left]
{\textit{LGI bindings}} (ADG);
\path (ADG) edge[bend left=-18] node[below left]
{\textit{API calls}} (CAIRO);
\path (CAIRO) edge[bend left=-18] node[below right]
{\textit{PNG image}} (USER);
\path (PHP) edge[bend left=-18] node[below left]
{\textit{HTML page}} (USER);
\path (LUA) edge[bend left=-18] node[above right]
{\textit{LGI bindings}} (CAIRO);
\end{tikzpicture}
\end{document}

Archive Download the corresponding diff file

Branches

Tags