summaryrefslogtreecommitdiff
path: root/info/visualtikz/Source/tkzstyl.tex
blob: 24958f987f3b4979a85eb209b75ccfcd769b0da5 (plain)
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

\SbSSCT{Styles sans variable}{Styles without variable}

\begin{tabular}{|c|c|} \hline  
\begin{tikzpicture}[mon style/.style={draw=blue,fill=red!20,very thick},baseline=0pt]
\draw (0,0) circle (2cm);
\draw[mon style] (0,0) circle (1cm);
\end{tikzpicture}
&  
\parbox{10cm}{ 
\BS{begin}\AC{tikzpicture} [mon style/.\RDD{style}=\AC{draw=blue, fill=red!20, very thick}]\\
\BS{draw} (0,0) circle (2cm); \\
\BS{draw}[mon style] (0,0) circle (1cm); \\
\BS{end}\AC{tikzpicture} \\ } 
\\ \hline 
\end{tabular} 


\SbSSCT{Styles avec variable}{Styles with variable}

\begin{tabular}{|c|c|} \hline  
\begin{tikzpicture}[mon style/.style={draw=#1,thick,fill=#1!50,scale=.5}]
\filldraw [mon style=red] (0,0) rectangle (2,1);
\filldraw [mon style=blue] (3,0) rectangle (5,1);
\end{tikzpicture}
&  
\parbox{12cm}{ 
\BS{begin}\AC{tikzpicture} [mon style/.\RDD{style}=\AC{draw={\color{red}  \#1}, thick, fill={\color{red}  \#1}!50, scale=.5}]\\
\BS{filldraw} [mon style=red] (0,0) rectangle (2,1);\\
\BS{filldraw} [mon style=blue] (3,0) rectangle (5,1);\\
\BS{end}\AC{tikzpicture} \\ 
} 
\\ \hline   

\end{tabular} 




\begin{tabular}{|c|c|} \hline 
 \multicolumn{2}{|c|}{\TFRGB{valeur par défaut}{With a default value }}
 \\ \hline
\begin{tikzpicture}[mon style/.style={draw=#1,thick,fill=#1!50,scale=.5},
mon style/.default=black]
\filldraw [mon style] (0,0) rectangle (2,1);
\filldraw [mon style=blue] (3,0) rectangle (5,1);
\end{tikzpicture}
&  
\parbox{12cm}{ 
\BS{begin}\AC{tikzpicture} [mon style/.\RDD{style}=\AC{draw={\color{red}  \#1},fill={\color{red}  \#1}!20,very thick},\\
mon style/\RDD{default}=black] \\
\BS{filldraw} [mon style] (0,0) rectangle (2,1);\\
\BS{filldraw} [mon style=blue] (3,0) rectangle (5,1);\\
\BS{end}\AC{tikzpicture} }  
\\ \hline   

\end{tabular}