Quick and hopefully easy question. Is there a way to apply fading both to the filling and to the border of a tikz path?

mwe

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node at (1, 0.5) {\Large\bfseries fading};
\draw[ultra thick, fill=purple, path fading=east] (0,0) rectangle (2,1);
\end{tikzpicture}
\end{document}


result

I'd like the black border to fade to alpha in the same way of the filling.

EDIT: Reading the comments it seems something specific to my setup, probably poppler/Evince, with chrome-integrated reader it works fine.

So, is there a way to make it work with all PDF readers? Not sure it matters, but I can draw something similar with inkscape (just setting border fill to gradient) and it works fine.

• Mine is fading with the exact same code O_o i.stack.imgur.com/HdcjJ.png – Phelype Oleinik Jan 26 '18 at 12:20
• @PhelypeOleinik weird, texlive 2017? – filippo Jan 26 '18 at 12:25
• Works for me with pdflatex from texlive 2017 i.stack.imgur.com/XXBNT.png. Also works with xelatex. – user36296 Jan 26 '18 at 13:55
• Any PDF reader is an impossible task. Adobe has the reference implementation. Sumatra on Windows is also pretty good. I see the faded border in your link by the way. So should you I guess – percusse Jan 26 '18 at 15:05
• @filippo As a workaround you could stack the red rectangle without boarder on top of a black rectangle (a bit larger) with fading. – user36296 Jan 26 '18 at 15:11

Workaround:

\documentclass{standalone}
\usepackage{tikz}