| 1 |
% !TeX spellcheck = en_US |
| 2 |
% !TeX root = tikz-ext-manual.tex |
| 3 |
% Copyright 2022 by Qrrbrbirlbel |
| 4 |
% |
| 5 |
% This file may be distributed and/or modified |
| 6 |
% |
| 7 |
% 1. under the LaTeX Project Public License and/or |
| 8 |
% 2. under the GNU Free Documentation License. |
| 9 |
% |
| 10 |
\section{Shape: Circle Cross Split} |
| 11 |
\begin{pgflibrary}{ext.shapes.circlecrosssplit} |
| 12 |
A circular shape with four parts that can be individually filled. |
| 13 |
\inspiration{ShapeSplitCircle-Q}{ShapeSplitCircle-A} |
| 14 |
\end{pgflibrary} |
| 15 |
\begin{ext_shape}{circle cross split} |
| 16 |
This shape has four node parts that are placed near the center of a circle. |
| 17 |
|
| 18 |
\begin{key}{/\pgfext/circle cross split part fill=\marg{list} (initially none)}\keycompat{pgf} |
| 19 |
Sets the custom fill color for each node part shape. |
| 20 |
The items in \meta{list} should be separated by commas |
| 21 |
(so if there is more than one item in \meta{list}, it must be surrounded by braces). |
| 22 |
If \meta{list} has less entries than node parts, |
| 23 |
then the remaining node parts use the color from the last entry in the list. |
| 24 |
This key will automatically set |/pgf/circle cross split uses custom fill|. |
| 25 |
\end{key} |
| 26 |
\begin{key}{/\pgfext/circle cross split uses custom fill=\opt{\meta{boolean}} (default true)}\keycompat{pgf} |
| 27 |
This enables the use of a custom fill for each of the node parts |
| 28 |
(including the area covered by the |inner sep|). |
| 29 |
The background path for the shape should not be filled (e.\,g., in \tikzname, |
| 30 |
the |fill| option for the node must be implicitly or explicitly set to |none|). |
| 31 |
Internally, this key sets the \TeX-if |\ifextpgfcirclecrosssplitcustomfill| appropriately. |
| 32 |
\end{key} |
| 33 |
\begin{codeexample}[preamble=\usepgflibrary{ext.shapes.circlecrosssplit}] |
| 34 |
\begin{tikzpicture}\Huge |
| 35 |
\node[name=s, shape=ext_circle cross split, shape example, inner xsep=1.5cm, fill=none, |
| 36 |
ext/circle cross split part fill={green,blue,red,yellow!90!black}] |
| 37 |
{\nodepart{text}text\nodepart{two}two |
| 38 |
\nodepart{three}three\nodepart{four}four}; |
| 39 |
\foreach \anchor/\placement in |
| 40 |
{north west/above left, north/above, north east/above right, |
| 41 |
west/left, center/left, east/right, |
| 42 |
mid west/right, mid/left, mid east/left, |
| 43 |
base west/left, base/left, base east/right, |
| 44 |
lower base west/left, lower base/below, lower base east/right, |
| 45 |
lower mid west/left, lower mid/above, lower mid east/right, |
| 46 |
south west/below left, south/below, south east/below right, |
| 47 |
text/below, 10/right, 130/above, two/left, three/left, four/left} |
| 48 |
\draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} |
| 49 |
node[\placement] {\scriptsize\texttt{(s.\anchor)}}; |
| 50 |
\end{tikzpicture} |
| 51 |
\end{codeexample} |
| 52 |
\end{ext_shape} |
| 53 |
\endinput |