rounded corners=<length>
如果我只想要部分(封闭的)路径,那么正确的语法是什么?
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[]
\draw[rounded corners=5.5] (77:1.5) arc (77:180-77:1.5) -- ++(0,1)
-- ++(-0.5,0.5) -- ++(0.5,0.5) % here rounded corners...
-- ++(0,1) -- ++(0.5,0) -- cycle;
\end{tikzpicture}
\end{document}
答案1
您可以在路径中途打开圆角,稍后再将其关闭:
\documentclass[margin=5mm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[]
\draw (77:1.5) arc (77:180-77:1.5) -- ++(0,1)
[rounded corners=5.5] -- ++(-0.5,0.5) [sharp corners] -- ++(0.5,0.5) % here rounded corners...
-- ++(0,1) -- ++(0.5,0) -- cycle;
\end{tikzpicture}
\end{document}