考虑这个例子:
\documentclass[margin=0.2cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, decorations.text}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0.0, 0.0);
\coordinate (B) at (-5.0, 5.0);
\draw[red, ->,
postaction={decorate,decoration={text effects along path,
text={sample text}, text align=center,
text effects/.cd,
text along path,
every character/.style={ yshift=0.5ex}}}] (A) arc (0:90:5);
\end{tikzpicture}
\end{document}
如何在不改变弧线中的任何内容的情况下改变文本“示例文本”的方向。
答案1
和reverse path
:
\documentclass[margin=0.2cm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes, decorations.text}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (0.0, 0.0);
\coordinate (B) at (-5.0, 5.0);
\draw[red, ->,
postaction={decorate,decoration={text effects along path,
text={sample text}, text align=center, reverse path,
text effects/.cd,
text along path,
every character/.style={
yshift=0.5ex}}}] (A) arc (0:90:5);
\end{tikzpicture}
\end{document}