6

I'm searching for a good looking solution for drawing a cut with scissor symbols with Tikz.

My starting point, which explains what is to be done looks as follows:

Image of a cut with scissors

The corresponding current LaTeX/Tikz code looks as follows:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{bbding}
\begin{document}

\begin{tikzpicture}
\begin{scope}
\clip (-0.5,0.3) .. controls +(1,0.4) and +(-1,-0.4) .. (3.7,0.3) -- (3.7,2) -- (0,2) -- cycle;

\node[fill=blue!20!white,rectangle,rounded corners=0.5cm,thick,inner sep=15pt,draw,anchor=south west] 
   at (0,0) {Hello World};
\end{scope}

\draw[thick,color=black!50!white,dashed] (-0.5,0.3) .. controls +(1,0.4) and +(-1,-0.4) .. 
   node[pos=0.2] {\color{black} \scriptsize \ScissorRightBrokenBottom}
   node[pos=0.4] {\color{black} \scriptsize \ScissorRightBrokenBottom}
   node[pos=0.6] {\color{black} \scriptsize \ScissorRightBrokenBottom}
   node[pos=0.8] {\color{black} \scriptsize \ScissorRightBrokenBottom}
 (3.7,0.3);

\end{tikzpicture}
\end{document}

But this is not yet good:

  • The scissors are not rotated and located a bit too low.
  • The fact that the cutting path is repeated is also not optimal.

So my question is: How can the quality of the solution be improved (while, in the optimal case, fixing the redundancy of the cutting path at the same time).

12

You can use decorations.markings library:

\documentclass[tikz, border=3mm]{standalone}
\usetikzlibrary{decorations.markings}
\usepackage{bbding}

\begin{document}

\begin{tikzpicture}[
decoration={markings,
            mark=between positions 0.2 and 0.8 step 0.2
            with { \node[font=\scriptsize,yshift=\pgflinewidth,
                         transform shape] {\ScissorRightBrokenBottom};}}
                ]
\begin{scope}
\clip (-0.5,0.3) .. controls +(1,0.4) and +(-1,-0.4) .. (3.7,0.3) -- (3.7,2) -| cycle;

\node[rounded corners=0.5cm,draw,thick,fill=blue!20!white,
      inner sep=15pt,anchor=south west] {Hello World};
\end{scope}

\path[draw=black!50!white, thick, dashed,
      postaction={decorate}] (-0.5,0.3) .. controls +(1,0.4) and +(-1,-0.4) .. (3.7,0.3);
\end{tikzpicture}
\end{document}

enter image description here

Edit: now scissor direction follows line as requested in OP comment.

5
  • Thanks! That doesn't rotate the scissors along the path yet, right? – DCTLib Dec 14 '20 at 11:42
  • @DCTLib, ups, you are right. I forgot to add option transform shape to the definition of scissor nodes. Corrected and improved their positions now. – Zarko Dec 14 '20 at 16:44
  • Uuuh, this is pretty nice now! – DCTLib Dec 14 '20 at 22:27
  • 2
    @DCTLib, realy? Then the answer may be ripe for acceptance :-) – Zarko Dec 14 '20 at 22:32
  • Indeed. I'm a fan of following the "wait for 24 hours before accepting a solution - there may be a better one still coming" rule, though. – DCTLib Dec 15 '20 at 14:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.