I am trying to get the text that I place inside a curved arrow to curve with the arrow. I have the following code that generates that given picture, but I wonder how I can get the text to curve with the arrow. I have found a solution proposal here, but I could not adapt it to my case. In particular, I would really like to get the definition of vecArrow to be modified to do what I want (ideally with the text as an argument). Any help would be appreciated.
\documentclass[table,xcolor=pdftex,dvipsnames]{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,snakes,positioning,decorations.text,decorations.pathmorphing,decorations.markings}
\begin{document}
\begin{frame}
\frametitle{Curved Arrow}
\tikzset{
vecArrow/.style={
line width=3ex,
decoration={markings,mark=at position
1 with {\arrow[scale=2, blue!20!white]{triangle 60}}},
blue!20!white,
shorten >= 32pt,
line width=4pt,
preaction = {decorate},
postaction = {draw=blue!20!white,line width=3ex, shorten >= 30pt}
}
}
\begin{tikzpicture}
\node[rectangle,draw,minimum width=2in, minimum height=1in] (box1) {};
\node[rectangle,draw,minimum width=2in, minimum height=1.5in,below right=of box1] (box2) {};
\draw[vecArrow] (box1.east) to[in=135,out=45] node[black,rotate=-47,anchor=west,xshift=-6mm]{\scriptsize Subgraph Match} (box2.north);
\end{tikzpicture}
\end{frame}
\end{document}
Best Answer
Here is one way to do it: