I have an outer and an inner path in tikz. I would like to create a fading between them, so that at the outer path the color is completly balck and at the inner completly white. My problem is to create a fading that is not going to one middle point but is equal along both paths.
Here is a minimalistic version of my code:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\coordinate (A) at (1,-3);
\coordinate (B) at (7,-1);
\coordinate (C) at (9,-7);
\coordinate (D) at (3,-9);
\fill[even odd rule,inner color=white,outer color=black]
%outer path
(A) arc (180:90:2) -- (B) arc (90:0:2) -- (C) arc (360:270:2) -- (D) arc (270:180:2) -- (A)
%inner path
($(A)+(1,0)$) arc (180:90:1) -- ($(B)+(0,-1)$) arc (90:0:1) --
($(C)+(-1,0)$) arc (360:270:1) -- ($(D)+(0,1)$) arc (270:180:1) -- ($(A)+(1,0)$);
\end{tikzpicture}
\end{document}
I would be very glad if someone could help me with this :-)
white
is in the center but you only show a small strip away from the center. Maybe tex.stackexchange.com/a/493406 gives you what you want.