# Getting rid of a thin framing line when shading a triangle

I am trying to draw a shaded triangle with tikz, using the following code:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\fill[top color=green!40,middle color=white,shading angle=45]  (-2.5,-3) -- (12.5,3) -- (-2.5,3) -- cycle;
\end{tikzpicture}
\end{document}


I think it is hard to see in the image posted below, but just along the diagonal is a very thin line. Is there any way to get rid of this line?

This is with Tikz/PGF version 2.10.

-
you can find out your pgf version by putting a \listfiles command into the preamble of your document. This will write all invoked packages and classes as well as their version into the log file. –  Benedikt Bauer Nov 7 '12 at 13:46
I think you should try with \draw[top color=green!40,middle color=white,shading angle=45,draw=none] (-2.5,-3) -- (12.5,3) -- (-2.5,3) -- cycle;. Does it fix the problem? –  Claudio Fiandrino Nov 7 '12 at 13:49
If this is going to be some sort of a header use the whole page not the triangle itself. –  percusse Nov 7 '12 at 13:50
@ClaudioFiandrino, yes, this works well. –  silvado Nov 7 '12 at 13:51
@BenediktBauer, thanks, I updated the information. –  silvado Nov 7 '12 at 13:54

Use \shade instead of \fill.

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\end{tikzpicture}
\end{document}


As noted by Paul replacing \fill by \path would also work:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\path[top color=green!40,middle color=white,shading angle=45]  (-2.5,-3) -- (12.5,3) -- (-2.5,3) -- cycle;
\end{tikzpicture}
\end{document}

-
@PaulGaborit The thing is so complex and I have trouble understanding your comment/objection :-) Can you shed some more light on it? You may feel free to edit the answer itself, if you feel appropriate. I appreciate your effort. Thanks. –  Harish Kumar Nov 7 '12 at 23:03
The problem is not to use or not to use \shade (top color always selects the shade option). The problem is to mix it with a fill operation. A simple \path instead of \fill is sufficient. –  Paul Gaborit Nov 8 '12 at 1:16