答案1
您可以使用 获得这种类型的阴影\pgfdeclarehorizontalshading
。
\documentclass[tikz,border=3mm]{standalone}
\pgfdeclarehorizontalshading{bwbwb}{4cm}{color(0cm)=(black);
color(2cm)=(black);
color(2.5cm)=(white); color(3cm)=(black); color(3.5cm)=(white);
color(4cm)=(black);color(6cm)=(black)}
\begin{document}
\begin{tikzpicture}
\draw[shading=bwbwb,shading angle=-20] (0,0) rectangle (5,1);
\end{tikzpicture}
\end{document}