norbusan / pgf-blur

Development of pg-blur package
415 stars 0 forks source link

using pgf-blur when you have multiple layers #2

Open mattvilim opened 5 years ago

mattvilim commented 5 years ago

I get strange behavior when using blurred drop shadows with pgf layers; objects on other layers disappear. Is this a bug or unsupported behavior?

I ran with pdflatex which says I have [pgf.sty] 2019/02/02 v3.1.1 (3.1.1)

\documentclass{article}

\usepackage{tikz}

\listfiles

\usetikzlibrary{shadows.blur}

\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

\begin{document}

\begin{tikzpicture}
  \begin{pgfonlayer}{foreground}
    \path[fill=red] (0,0) rectangle (5,5);
  \end{pgfonlayer}

  \path[fill=green] (1,1) rectangle (6,6);

  \begin{pgfonlayer}{background}
    \path[fill=orange, blur shadow] (2,2) rectangle (7,7);
  \end{pgfonlayer}
\end{tikzpicture}

\end{document}

The expected result is like this with a shadow under the orange box. 1 The actual result doesn't render the red rectangle. 2

norbusan commented 5 years ago

Interesting. Yes, the pgf-blu code plays around with layers, so it might well be that it messes up other things. This is of course not intended.