I wonder if there is a conveniant way to skip a path/shape. For example, I can use \draw (0, 0) -- [clip path={...}] (2, 3); or \draw (0, 0) -- [clip path name=<path name>] (2, 3); or \draw (0, 0) -- [clip node=<nodename>] (2, 3); to skip the given path/node.
I know some code to do this, but they cost several lines:
Inverse clip
\documentclass[tikz, border=1cm]{standalone}
\tikzset{
revclip/.style={
insert path={
(current page.north east) --
(current page.south east) --
(current page.south west) --
(current page.north west) --
(current page.north east)
},
},
}
\begin{document}
\begin{tikzpicture}
\draw (1, 1) circle (1cm);
\draw (0.6, 1) circle (0.5cm);
\path [clip, overlay] (1, 1) circle (1cm) [revclip];
\draw (0, 0) -- (2, 3);
\end{tikzpicture}
\end{document}
Background layer
\documentclass[tikz, border=1cm]{standalone}
\pgfdeclarelayer{back}
\pgfsetlayers{back, main}
\begin{document}
\begin{tikzpicture}
\draw (1, 1) circle (1cm);
\draw (0.6, 1) circle (0.5cm);
\begin{pgfonlayer}{back}
\draw (0, 0) -- (2, 3);
\fill[white, behind path] (1, 1) circle (1cm);
\end{pgfonlayer}
\end{tikzpicture}
\end{document}

\begin{tikzpicture} \draw[ (0, 0) -- (2, 3); \fill[white, draw=black] (1, 1) circle (1cm); \end{tikzpicture}do same thing. Nobackgroundslibrary needed. – Jun 28 '20 at 19:40\draw (0, 0) -- (2, 3); \fill[white,draw=black] (1, 1) circle (1cm); \draw (0.6, 1) circle (0.5cm);– Jun 29 '20 at 07:04