summaryrefslogtreecommitdiff
path: root/info/visualtikz/Source/tkzbackground.tex
blob: d55f6226add0ee031541ebca7a15bcf21df2e538 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
 \tikzset{background rectangle/.style={fill=cyan!20,draw=blue,line width=2pt}}

\SbSSCT{Encadrement}{Framing}
\label{lib-bkgd}
 
 \begin{tabular}{|c|l|} \hline  
 \begin{tikzpicture}[baseline=0pt,show background rectangle]
 \filldraw[fill=yellow] (0,0) ellipse (1 and .5);
 \end{tikzpicture}
&
\parbox{10cm}{
 \footnotemark \\
\BS{begin}\AC{tikzpicture}[\RDD{show background rectangle}]\\
\BS{filldraw}[fill=yellow] (0,0) ellipse (1 and .5 );\\
\BS{end}\AC{tikzpicture}\\
\\
\emph{\TFRGB{Autre syntaxe}{Other syntax}} : \\
\BS{begin}\AC{tikzpicture}[\RDD{framed}]\\
}
\\ \hline 
\end{tabular}

 \footnotetext[1]{ \BS{tikzset}\AC{background rectangle/.style=\AC{fill=cyan!20,draw=blue,line width=2pt}}}
  
\bigskip

\subsubsection{Options}

\begin{tabular}{|c|c|c|} \hline  
\multicolumn{3}{|c|}{  [show background rectangle,\RDD{inner frame xsep}=1cm]  }
\\ \hline
\begin{tikzpicture}[show background rectangle,inner frame xsep=1cm]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&  
\begin{tikzpicture}[show background rectangle,inner frame ysep=1cm]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&  
\begin{tikzpicture}[show background rectangle,inner frame sep=1cm]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
\\ \hline  
\RDD{inner frame xsep}=1cm & \RDD{inner frame ysep}=1cm & \RDD{inner frame sep}=1cm
\\ \hline 
\multicolumn{3}{|c|}{\dft : inner frame xsep=1ex
,  inner frame ysep=1ex
}  

\\ \hline 
\begin{tikzpicture}[show background rectangle,tight background]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&
\begin{tikzpicture}[show background rectangle,loose background]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&
\begin{tikzpicture}[show background rectangle,rounded corners]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
\\ \hline 
\RDD{tight background} & \RDD{loose background} & \RDD{rounded corners} \\ \hline 
(inner frame sep = 0pt) & (inner frame sep = 2ex) & 
 \\ \hline
 \end{tabular}
   
  
\subsubsection{Style}
 
 \begin{tabular}{|c|c|c|c|c|} \hline  
 \multicolumn{5}{|c|}{  [\RDD{background rectangle/.style}=\AC{double,draw=blue},framed]  }
 \\ \hline 
 \begin{tikzpicture}[framed,background rectangle/.style={double,draw=blue}]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
 &
 \begin{tikzpicture}[show background rectangle,background rectangle/.style={fill=green,draw=blue}]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
  &
  \begin{tikzpicture}[show background rectangle,background rectangle/.style={top color=green,draw=blue}]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
  \end{tikzpicture}
 &
 \begin{tikzpicture}[show background rectangle,background rectangle/.style={line width=4pt,draw=blue}]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
  &
  \begin{tikzpicture}[show background rectangle,background rectangle/.style={rounded corners=.5cm,draw=blue}]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
  \end{tikzpicture}
 \\ \hline 
 \RDD{double} & \RDD{fill}=green & \RDD{top color}=green & \RDD{line width}=4pt & \RDD{rounded corners}=0.5cm
  \\ \hline 

\end{tabular} 

\SbSSCT{Encadrement partiel}{Partial framing}

 \tikzset{background top/.style={fill=green!20,draw=blue,line width=2pt}}
  \tikzset{background bottom/.style={fill=green!20,draw=blue,line width=2pt}}
   \tikzset{background left/.style={fill=green!20,draw=blue,line width=2pt}}
    \tikzset{background right/.style={fill=green!20,draw=blue,line width=2pt}}
 
 \begin{tabular}{|c|c|c|c|c|} \hline  
\begin{tikzpicture}[show background top]
 \filldraw[fill=yellow] (0,0) ellipse (10mm and 5mm);
\end{tikzpicture}
&
\begin{tikzpicture}[show background bottom]
 \filldraw[fill=yellow](0,0) ellipse (10mm and 5mm);
\end{tikzpicture}
&
\begin{tikzpicture}[show background left]
 \filldraw[fill=yellow] (0,0) ellipse (10mm and 5mm);
\end{tikzpicture}
&
\begin{tikzpicture}[show background right]
 \filldraw[fill=yellow] (0,0) ellipse (10mm and 5mm);
\end{tikzpicture}
\\ \hline
\RDD{show background top} & \RDD{show background bottom} & \RDD{show background left} & \RDD{show background right}
\\ \hline
\end{tabular}

\bigskip

 \begin{tabular}{|c|c|c|} \hline 
 \multicolumn{3}{|c|}{ [framed,show background top,\RDD{outer frame xsep}=1cm]  }
 \\ \hline  
  
\begin{tikzpicture}[framed,show background top,outer frame xsep=1cm]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&
\begin{tikzpicture}[framed,show background left,outer frame ysep=1cm]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
&
\begin{tikzpicture}[framed,show background left,show background left,show background top,outer frame sep=1cm]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
\end{tikzpicture}
\\ \hline 
\RDD{outer frame xsep}=1cm & \RDD{outer frame ysep}=1cm
& \RDD{outer frame sep}=1cm
\\ \hline 
\end{tabular} 

\subsubsection{Style}

 \begin{tabular}{|c|c|c|c|c|} \hline  
 \multicolumn{4}{|l|}{  \BS{begin}\AC{tikzpicture}[show background left,  }\\
 \multicolumn{4}{|l|}{ \hspace{0.5cm}  [\RDD{background left/.style}=\AC{double,ultra thick,draw=blue}]  }
 \\ \hline
  
 \begin{tikzpicture}[show background left,background left/.style={double,ultra thick,draw=blue}]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
 &
 \begin{tikzpicture}[show background left,background left/.style={<->,ultra thick,draw=blue}]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
 &
 \begin{tikzpicture}[show background left,background left/.style={line width=10pt,draw=blue}]
 \filldraw[fill=yellow](0,0) ellipse (1cm and .5cm);
 \end{tikzpicture}
  &
  \begin{tikzpicture}[show background left,background left/.style={dashed,ultra thick,draw=blue}]
 \filldraw[fill=yellow] (0,0) ellipse (1cm and .5cm);
  \end{tikzpicture}
 \\ \hline 
 \RDD{double} & \RDD{<->} &  \RDD{line width}=10pt & \RDD{dashed}
  \\ \hline 

\end{tabular}

\SbSbSSCT{Quadrillage}{Gridding}

 \begin{tabular}{|c|l|} \hline  
 \begin{tikzpicture}[baseline=0pt,show background grid]
 \filldraw [fill=yellow](0,0) ellipse (2 and 1);
 \end{tikzpicture}
&
\parbox{8cm}{
\BS{begin}\AC{tikzpicture}[\RDD{show background grid}]\\
\BS{filldraw}[fill=yellow] (0,0) ellipse (2 and 1);\\
\BS{end}\AC{tikzpicture}\\
\\
\emph{\TFRGB{Autre syntaxe}{Other syntax}}   : \\
\BS{begin}\AC{tikzpicture}[\RDD{gridded}]\\
}
\\ \hline 
\end{tabular}

\subsubsection{Style}

 
 \begin{tabular}{|c|c|c|} \hline  
 \multicolumn{3}{|l|}{  [\RDD{background  grid/.style}=\AC{ultra thick,draw=blue},show background grid]  }
 \\ \hline
\begin{tikzpicture}[background grid/.style={ultra thick,draw=blue},show background grid]
 \filldraw [fill=yellow](0,0) ellipse (2 and 1);
\end{tikzpicture}
&
\begin{tikzpicture}[background grid/.style={draw=red},show background grid]
 \filldraw [fill=yellow](0,0) ellipse (2 and 1);
\end{tikzpicture}
&
\begin{tikzpicture}[background grid/.style={step=.5cm,draw=blue},show background grid]
 \filldraw [fill=yellow](0,0) ellipse (2 and 1);
\end{tikzpicture}
\\ \hline
\RDD{ultra thick} ,draw=blue,\RDD{draw}=blue & draw=red & \RDD{step}=.5cm,draw=blue
\\ \hline
\end{tabular}

\SbSbSSCT{Encadrement et quadrillage}{Framing and gridding}
 
 \begin{tabular}{|c|l|} \hline  
 \begin{tikzpicture}[baseline=0pt,framed,gridded]
 \filldraw [fill=yellow](0,0) ellipse (2 and 1);
 \end{tikzpicture}
&
\parbox{8cm}{
\BS{begin}\AC{tikzpicture}[\RDD{framed , gridded }]\\
\BS{filldraw}[fill=yellow] (0,0) ellipse (2 and 1);\\
\BS{end}\AC{tikzpicture}\\
\\

}
\\ \hline 
\end{tabular}