From ce8083552e0d948bf495e72d5c4d2680b505c90b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 25 Sep 2022 03:00:53 +0000 Subject: CTAN sync 202209250300 --- .../pgflibraryext.shapes.circlearrow.code.tex | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex (limited to 'graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex') diff --git a/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex new file mode 100644 index 0000000000..9eb1c6ab09 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/pgflibraryext.shapes.circlearrow.code.tex @@ -0,0 +1,66 @@ +% Copyright 2022 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% +\pgfset{ + circle arrow start angle/.initial=, + circle arrow end angle/.initial=, + circle arrow delta angle/.initial=, + circle arrow arrows/.initial=-, + circle arrow/@turn left/.style={/pgf/circle arrow arrows=->,/pgf/circle arrow delta angle=340}, + circle arrow/@turn right/.style={/pgf/circle arrow arrows=<-,/pgf/circle arrow delta angle=340}, + circle arrow turn left north/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=100}, + circle arrow turn left east/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=10}, + circle arrow turn left south/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=280}, + circle arrow turn left west/.style = {/pgf/circle arrow/@turn left, /pgf/circle arrow start angle=190}, + circle arrow turn right north/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=100}, + circle arrow turn right east/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=10}, + circle arrow turn right south/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=280}, + circle arrow turn right west/.style = {/pgf/circle arrow/@turn right, /pgf/circle arrow start angle=190}, +} +\pgfdeclareshape{circle arrow}{ + \inheritsavedanchors[from=circle] + \inheritanchorborder[from=circle] + \inheritanchor[from=circle]{north} + \inheritanchor[from=circle]{north west} + \inheritanchor[from=circle]{north east} + \inheritanchor[from=circle]{center} + \inheritanchor[from=circle]{west} + \inheritanchor[from=circle]{east} + \inheritanchor[from=circle]{mid} + \inheritanchor[from=circle]{mid west} + \inheritanchor[from=circle]{mid east} + \inheritanchor[from=circle]{base} + \inheritanchor[from=circle]{base west} + \inheritanchor[from=circle]{base east} + \inheritanchor[from=circle]{south} + \inheritanchor[from=circle]{south west} + \inheritanchor[from=circle]{south east} + \backgroundpath{ + \pgfkeysgetvalue{/pgf/circle arrow start angle}\pgf@sh@circlearrow@s + \pgfkeysgetvalue{/pgf/circle arrow end angle}\pgf@sh@circlearrow@e + \pgfkeysgetvalue{/pgf/circle arrow delta angle}\pgf@sh@circlearrow@d + \ifx\pgf@sh@circlearrow@s\pgfutil@empty% + \pgfmathsetmacro\pgf@sh@circlearrow@s{\pgf@sh@circlearrow@e-\pgf@sh@circlearrow@d}% + \else + \ifx\pgf@sh@circlearrow@e\pgfutil@empty% + \pgfmathsetmacro\pgf@sh@circlearrow@e{\pgf@sh@circlearrow@s+\pgf@sh@circlearrow@d}% + \fi% + \fi + \pgfutil@tempdima=\radius + \pgfmathsetlength{\pgf@xb}{\pgfkeysvalueof{/pgf/outer xsep}}% + \pgfmathsetlength{\pgf@yb}{\pgfkeysvalueof{/pgf/outer ysep}}% + \ifdim\pgf@xb<\pgf@yb + \advance\pgfutil@tempdima by-\pgf@yb + \else + \advance\pgfutil@tempdima by-\pgf@xb + \fi + \pgfpathmoveto{\pgfpointadd{\centerpoint}{\pgfpointpolar{\pgf@sh@circlearrow@s}{\pgfutil@tempdima}}}% + \pgfpatharc{\pgf@sh@circlearrow@s}{\pgf@sh@circlearrow@e}{\pgfutil@tempdima}% + \pgfkeysgetvalue{/pgf/circle arrow arrows}\pgf@temp + \expandafter\pgfsetarrows\expandafter{\pgf@temp}% + } +} \ No newline at end of file -- cgit v1.2.3