| 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 Arrow} |
| 11 |
\begin{pgflibrary}{ext.shapes.circlearrow} |
| 12 |
A circular shape named |circle arrow| that has an arc as its background path that can have an arrow tip. |
| 13 |
\inspiration{ShapeCircleArrow-Q}{ShapeCircleArrow-A} |
| 14 |
\end{pgflibrary} |
| 15 |
\begin{ext_shape}{circle arrow} |
| 16 |
This shape is an arrow whose path is an arc -- defined very similar to the |arc|% |
| 17 |
\indexPathOperationO{arc} path operation -- that can possibly be customized with |
| 18 |
arrow tips. |
| 19 |
|
| 20 |
\begin{key}{/\pgfext/circle arrow start angle=\meta{start angle} (initially \{\})}\keycompat{pgf} |
| 21 |
Sets the start angle. |
| 22 |
\end{key} |
| 23 |
\begin{key}{/\pgfext/circle arrow end angle=\meta{end angle} (initially \{\})}\keycompat{pgf} |
| 24 |
Sets the end angle. |
| 25 |
\end{key} |
| 26 |
\begin{key}{/\pgfext/circle arrow delta angle=\meta{delta angle} (initially \{\})}\keycompat{pgf} |
| 27 |
Sets the delta angle. |
| 28 |
\end{key} |
| 29 |
\begin{key}{/\pgfext/circle arrow arrows=% |
| 30 |
\meta{start arrow tip specification}-\meta{end arrow tip specification} (initially -)}\keycompat{pgf} |
| 31 |
The specification will be forwarded to |\pgfsetarrows|\indexCommandO{\pgfsetarrows}. |
| 32 |
\end{key} |
| 33 |
|
| 34 |
A few handful styles are pre-defined. |
| 35 |
\begin{key}{/\pgfext/circle arrow turn left north}\keycompat{pgf} |
| 36 |
Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| |
| 37 |
and |circle arrow arrows = ->|. |
| 38 |
\end{key} |
| 39 |
\begin{key}{/\pgfext/circle arrow turn left east}\keycompat{pgf} |
| 40 |
As above but |circle arrow start angle = 10|. |
| 41 |
\end{key} |
| 42 |
\begin{key}{/\pgfext/circle arrow turn left west}\keycompat{pgf} |
| 43 |
As above but |circle arrow start angle = 280|. |
| 44 |
\end{key} |
| 45 |
\begin{key}{/\pgfext/circle arrow turn left south}\keycompat{pgf} |
| 46 |
As above but |circle arrow start angle = 190|. |
| 47 |
\end{key} |
| 48 |
\begin{key}{/\pgfext/circle arrow turn right north}\keycompat{pgf} |
| 49 |
Sets |circle arrow start angle = 100|, |circle arrow delta angle = 340| |
| 50 |
and |circle arrow arrows = <-|. |
| 51 |
\end{key} |
| 52 |
\begin{key}{/\pgfext/circle arrow turn right east}\keycompat{pgf} |
| 53 |
As above but |circle arrow start angle = 10|. |
| 54 |
\end{key} |
| 55 |
\begin{key}{/\pgfext/circle arrow turn right west}\keycompat{pgf} |
| 56 |
As above but |circle arrow start angle = 280|. |
| 57 |
\end{key} |
| 58 |
\begin{key}{/\pgfext/circle arrow turn right south}\keycompat{pgf} |
| 59 |
As above but |circle arrow start angle = 190|. |
| 60 |
\end{key} |
| 61 |
|
| 62 |
\begingroup |
| 63 |
\catcode`\|=12 |
| 64 |
\catcode`\&=\active |
| 65 |
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow,matrix}] |
| 66 |
\begin{tikzpicture} |
| 67 |
\matrix[matrix of nodes, draw=none, row sep=1em, column sep=1em, |
| 68 |
every node/.style={draw=gray, shape=ext_circle arrow, ultra thick, inner sep=1em} |
| 69 |
] (m) { |
| 70 |
|[ext/circle arrow turn left north]| & |[ext/circle arrow turn left east]| \\ |
| 71 |
|[ext/circle arrow turn left west]| & |[ext/circle arrow turn left south]| \\ |
| 72 |
|[ext/circle arrow turn right north]| & |[ext/circle arrow turn right east]| \\ |
| 73 |
|[ext/circle arrow turn right west]| & |[ext/circle arrow turn right south]| \\ |
| 74 |
}; |
| 75 |
\end{tikzpicture} |
| 76 |
\end{codeexample} |
| 77 |
\endgroup |
| 78 |
\begin{codeexample}[preamble=\usetikzlibrary{ext.shapes.circlearrow},width=16cm] |
| 79 |
\begin{tikzpicture}\Huge |
| 80 |
\node[name=s, shape=ext_circle arrow, |
| 81 |
ext/circle arrow turn left west, shape example] |
| 82 |
{Circle Arrow\vrule width 1pt height 2cm}; |
| 83 |
\foreach \anchor/\placement in |
| 84 |
{north west/above left, north/above, |
| 85 |
north east/above right, |
| 86 |
west/left, center/above, east/right, |
| 87 |
mid west/right, mid/above, mid east/left, |
| 88 |
base west/left, base/below, base east/right, |
| 89 |
south west/below left, south/below, |
| 90 |
south east/below right, |
| 91 |
text/left, 10/right, 130/above} |
| 92 |
\draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} |
| 93 |
node[\placement] {\scriptsize\texttt{(s.\anchor)}}; |
| 94 |
\end{tikzpicture} |
| 95 |
\end{codeexample} |
| 96 |
\end{ext_shape} |
| 97 |
\endinput |