我希望箭头能随弧度缩放。请参见下面的示例。您会注意到,只要弧度半径较大,箭头看起来就很好。
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\begin{document}
\tikzset{
pics/carc/.style args={#1:#2:#3}{
code={
\draw[pic actions] (#1:#3) arc(#1:#2:#3);
}
}
}
\begin{tikzpicture}
\draw[thick] (4,2) pic[red, -latex]{carc=10:290:0.2cm};
\draw[thick] (8,2) pic[red, -latex]{carc=10:290:1.2cm};
\end{tikzpicture}
\end{document}
答案1
加载bending
库:
\documentclass[crop,tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,bending}
\begin{document}
\tikzset{
pics/carc/.style args={#1:#2:#3}{
code={
\draw[pic actions] (#1:#3) arc(#1:#2:#3);
}
}
}
\begin{tikzpicture}
\draw[thick] (4,2) pic[red, -latex]{carc=10:290:0.2cm};
\draw[thick] (8,2) pic[red, -latex]{carc=10:290:1.2cm};
\end{tikzpicture}
\end{document}