# Custom background on beamer slide - outline of pgf path rectangle

I'm trying to make custom background for my slides in beamer presentation, gradient one to be exact. It is going pretty good, mainly because of other people questions here, but I have one problem that I just couldn't solve.

When I use code like this:

\pgfdeclareverticalshading{myshadingE}{100bp}{color(0bp)=(black);color(100bp)=(white)}
\usebackgroundtemplate{
\begin{tikzpicture}
\pgfpathrectangle{(0,0)}{\pgfpoint{\paperwidth}{\paperheight}}
\pgfusepath{stroke}
\end{tikzpicture}}


I do have my gradient and all, but there is black outline (edges of the rectangle) visible on left and top side of slide. Can anyone help me with that one? ^^"

• I'm not sure I understand, but does removing \pgfusepath{stroke} solve your problem? – Nico Boni Nov 21 '13 at 16:02
• I will be honest, I'm not entirely sure what I'm doing. :D It's more of trial and error process - I do have \pgfusepath{stroke} but it doesn't help me. :( – Dino Nov 21 '13 at 16:07
• I was suggesting to remove it. Anyway, in different pdf viewers I got different results: maybe is your pdf reader that adds the black border? – Nico Boni Nov 21 '13 at 16:57
• On all viewers I have currently installed on this machine I do see that outline. Removing \pgfusepath{stroke} helped me, thank you very much. ^_^ If you'll post this as an answer then I can accept it as a solution. – Dino Nov 22 '13 at 8:48

It seems the black outline was caused by \pgfusepath{stroke}.
With \pgfusepath{stroke}: