I have a curved arrow and want to put text inside of it (having the same curve as the arrow, of course). If the text is longer than the arrow, the text should be put on multiple lines (optimally with the arrow automatically getting thicker appropriately). See figure below.
(How) can I do this?
Update:
I now use
\coordinate (specRoot) at (-10,0);
\coordinate (testTreeRoot) at (0,0);
\draw[->, >=latex, blue!20!white, line width=15pt, bend left]
(specRoot) to (testTreeRoot);
\path [decorate,decoration={text along path, text={traverse part of
the STS and heuristically choose the best test tree}}]
[out=30] (specRoot) to [in=130] (testTreeRoot);
But how can I combine the decorated text along the path and the actual arrow?
How can I do a carriage return, i.e. decorate two lines of text along a single path?
Update:
And now I use the following, in the file lazyOTFoverviewSmall.tex
:
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.2cm, semithick, mypostaction/.style 2 args={
decoration={
text align={
left indent=#1},
text along path,
text={#2}
},
decorate
}
]
\begin{scope}[shift={(-10cm,0cm)}]
\node[state] (specq0) {$q_0$};
\end{scope}
\begin{scope}
\node[state] (q0) {$q_0$};
\end{scope}
\coordinate (specRoot) at (-10,0);
\coordinate (testTreeRoot) at (0,0);
\draw[-latex, blue!20!white, line width=5ex, bend left]
(specRoot) ++(1cm,1cm)
to (testTreeRoot) ++(-1cm,1cm);
\path [postaction={mypostaction={1cm}{traverse part of the STS}},
postaction={mypostaction={1cm}{and heuristically choose the best test
tree}, /pgf/decoration/raise=-3mm}]
[out=30] (specRoot) ++(1cm,1cm) to [in=130] (testTreeRoot) ++(-1cm,1cm);
\end{tikzpicture}
and in master.tex
I have:
\usepackage{tikz}
\usetikzlibrary{decorations.text}
\usetikzlibrary{backgrounds,shapes} %pictures
\usetikzlibrary{arrows,automata}
....
\begin{document}
...
\begin{figure}[hbt]
\centering
\scalebox{.7}{\input{gfx/MBT/lazyOTFoverviewSmall.tex}}
\caption{Overview of Lazy On-the-fly MBT}\label{fig:lazyOTFoverview}
\end{figure}
....
text along path
decoration. You could probably shift the first half of the text up, and the second half down via apostaction