I want to make a small technical drawing in tikz. Cuts in technical drawings are shown with a handwritten line which is realized with the "pencildraw" (derived from another question here). The rest should be straight lines. Because it is a cut, the pattern "north east lines" should fill the whole form.

I added a minimal example here:




decoration={random steps,segment length=4pt, amplitude=0.8pt}
line cap= round

\draw[pencildraw,pattern = north east lines] (0,0) --(2,0)(0,2) --(2,2);

\draw[pattern = north east lines] (0,0) to (0,2)(2,0) to (2,2);

\fill[pattern = north east lines] (0,0) rectangle (2,2);



rendered view of above code

With this approach, the north west lines draw over the handwritten line. Also, the boundaries are not one continuous line, which makes the ends look terrible in cases.

1 Answer 1


You need to create the enclosing path in one go then it can clip the pattern lines properly.

     decoration={random steps,segment length=4pt, amplitude=0.8pt}}]

\draw[pattern = north east lines]  decorate[pencildraw]{(0,0) --(2,0)} --(2,2) 
                                                 decorate[pencildraw]{--(0,2)} --cycle;


enter image description here

  • I always tried to pass it as an argument for "to[]". Now everything works :)
    – JulianWgs
    Commented Aug 2, 2017 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .