In my drawings I use a hand drawn looking line style to indicate discontinuity. Therefore I use a random line style. Since you cannot change the decoration in between a path creation, I’m facing a problem. How do I fill an area that is defined by such a style? Or to rephrase it: how can I fill the second rectangle in the following example?
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\tikzset{handwritten/.style = {
decorate, decoration={random steps, segment length=2mm, amplitude=0.3mm}
}
}
\begin{document}
\begin{tikzpicture}
\draw[fill=green] (0,0) -- ++(left:3) -- ++(down:1) [handwritten] -- ++(right:3) -- cycle;
\end{tikzpicture}
\begin{tikzpicture}
\draw (0,0) -- ++(left:3);
\draw[handwritten] (-3,0) -- ++(down:1);
\draw (-3,-1) -- ++(right:3);
\draw[handwritten] (0,-1) -- (0,0);
\end{tikzpicture}
\end{document}
