我希望直线段可以作为zigzag
装饰:
这是我的妈妈:
\documentclass[tikz, preview=true]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw[fill=green] (1,1) to[out=45, in=140, bend left] (1,2) to[decorate, decoration=zigzag] (1.5,1.5) to[out=330, in=212, bend right] cycle;
\end{tikzpicture}
\end{document}
答案1
这里的一个解决方案是使用装饰“范围”:
\documentclass[tikz,border=5]{standalone}
\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw[fill=green]
(1,1) to [out=45, in=140, bend left] (1,2)
decorate [decoration={zigzag, segment length=3pt, amplitude=1pt}]
{ to (1.5,1.5) } to [out=330, in=212, bend right] cycle;
\end{tikzpicture}
\end{document}