Skip to content

Instantly share code, notes, and snippets.

@guziy
Created July 21, 2016 21:13
Show Gist options
  • Save guziy/77de66b231c5dccda9a49222cd279d28 to your computer and use it in GitHub Desktop.
Save guziy/77de66b231c5dccda9a49222cd279d28 to your computer and use it in GitHub Desktop.
%% Inspired from http://www.texample.net/tikz/examples/circular-arrows-text/
\PassOptionsToPackage{dvipsnames}{xcolor}
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.text}
\usepackage{libertine}
\newcommand*{\mytextstyle}{\sffamily\Large\bfseries\color{blue!85}}
\newcommand{\arcarrow}[8]{%
% inner radius, middle radius, outer radius, start angle,
% end angle, tip protusion angle, options, text
\pgfmathsetmacro{\rin}{#1}
\pgfmathsetmacro{\rmid}{#2}
\pgfmathsetmacro{\rout}{#3}
\pgfmathsetmacro{\astart}{#4}
\pgfmathsetmacro{\aend}{#5}
\pgfmathsetmacro{\atip}{#6}
% \fill[#7] (\astart:\rin) arc (\astart:\aend:\rin)
% -- (\aend+\atip:\rmid) -- (\aend:\rout) arc (\aend:\astart:\rout)
% -- (\astart+\atip:\rmid) -- cycle;
\path[font = \sffamily, decoration = {text along path, text = {|\mytextstyle|#8},
text align = {align = center}, raise = -0.5ex}, decorate]
(\astart+\atip:\rmid) arc (\astart+\atip:\aend+\atip:\rmid);
}
\begin{document}
\begin{tikzpicture}
\fill[even odd rule,red!30] circle (4.5) circle (5.5);
\arcarrow{3}{5}{3}{225}{135}{0}{red,draw = red!50!black, very thick}{Theme A};
\arcarrow{3}{5}{3}{45}{-45}{0}{red,draw = red!50!black, very thick}{Theme C};
\arcarrow{3}{5}{3}{225}{315}{0}{red,draw = red!50!black, very thick}{Theme B};
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment