summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex')
-rw-r--r--Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex99
1 files changed, 99 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex b/Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex
new file mode 100644
index 00000000000..151e7ec237e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/visualtikz/Source/tkzscope.tex
@@ -0,0 +1,99 @@
+\subsection{Environnement Scope}
+\RRR{12-3}
+
+\begin{tabular}{|c|c|} \hline
+\parbox[b]{8cm}{
+\BS{begin}\AC{tikzpicture}[line width = 3mm] \\ \\
+\BS{draw} (0.5,6) - - (2.5,6);\\
+
+\ESS{begin\AC{scope}}[{\color{red}red}] \\
+\BS{draw} (0.5,5) - - (2.5,5); \\
+\BS{draw} (0.5,4) - - (2.5,4);\\
+\ESS{end\AC{scope}} \\ \\
+\BS{draw} (0.5,3) - - (2.5,3);\\ \\
+\ESS{begin\AC{scope}}[{\color{red}green}] \\
+\BS{draw} (0.5,2) - - (2.5,2);\\
+\BS{draw} [{\color{red}red}] (0.5,1) -- (2.5,1);\\
+\BS{draw} (0.5,0) - - (2.5,0);\\
+\ESS{end\AC{scope}} \\ \\
+\BS{end}\AC{tikzpicture}
+}
+&
+\begin{tikzpicture}[line width = 3mm,baseline=-.5cm]
+\draw[help lines] (0,0) grid (3,6);
+\draw (0.5,6) -- (2.5,6);
+\begin{scope}[red]
+\draw (0.5,5) -- (2.5,5);
+\draw (0.5,4) -- (2.5,4);
+\end{scope}
+\draw (0.5,3) -- (2.5,3);
+\begin{scope}[green]
+\draw (0.5,2) -- (2.5,2);
+\draw[red] (0.5,1) -- (2.5,1);
+\draw (0.5,0) -- (2.5,0);
+\end{scope}
+\end{tikzpicture}
+\\ \hline
+\end{tabular}
+
+\subsection{library scopes}
+
+\subsubsection{Simplification d'un environnement scope}
+\RRR{12-3-2}
+
+ \maboite{\BS{usetikzlibrary}\AC{scopes}}
+\label{lib-scopes}
+
+\begin{tabular}{|c|c|} \hline
+\parbox[b]{8cm}{
+\BS{begin}\AC{tikzpicture}[line width = 3mm] \\ \\
+\BS{draw} (0.5,6) - - (2.5,6);\\ \\
+{\color{red} \{} [red] \\
+\BS{draw} (0.5,5) -- (2.5,5); \\
+\BS{draw} (0.5,4) -- (2.5,4);\\
+{\color{red} \} } \\ \\
+\BS{draw} (0.5,3) -- (2.5,3);\\ \\
+{\color{red} \{ }[green] \\
+\BS{draw} (0.5,2) -- (2.5,2);\\
+\BS{draw} [{\color{red}RED}] (0.5,1) -- (2.5,1);\\
+\BS{draw} (0.5,0) -- (2.5,0);\\
+{\color{red} \} }\\ \\
+\BS{end}\AC{tikzpicture}
+}
+&
+\begin{tikzpicture}[line width = 3mm,baseline=-.5cm]
+\draw[help lines] (0,0) grid (3,6);
+\draw (0.5,6) -- (2.5,6);
+{[red]
+\draw (0.5,5) -- (2.5,5);
+\draw (0.5,4) -- (2.5,4);
+}
+\draw (0.5,3) -- (2.5,3);
+{[green]
+\draw (0.5,2) -- (2.5,2);
+\draw [red] (0.5,1) -- (2.5,1);
+\draw (0.5,0) -- (2.5,0);
+}
+\end{tikzpicture}
+\\ \hline
+\end{tabular}
+
+\subsubsection{Portée d'un seul élément }
+
+\begin{tabular}{|c|c|} \hline
+\begin{tikzpicture}
+\node [fill=white] at (1,1) {\DFR};
+\scoped [on background layer]
+\draw (0,0) grid (3,2);
+\end{tikzpicture}
+&
+\begin{tikzpicture}
+\node [fill=white] at (1,1) {\DFR};
+\draw (0,0) grid (3,2);
+\end{tikzpicture}
+\\ \hline
+\BS{node} [fill=white] at (1,1) \AC{\BS{DFR}}; &\BS{node} [fill=white] at (1,1) \AC{\BS{DFR}}; \\
+\BSS{scoped} [on background layer] & \\
+\BS{draw} (0,0) grid (3,2); & \BS{draw} (0,0) grid (3,2);
+\\ \hline
+\end{tabular} \ No newline at end of file