# tikz: Black hole eats pictures

While playing around with shadings I accidentally created a black hole (a zero-width rectangle) which ate all my pictures and text on the page:

\documentclass{article}
\usepackage{tikz}

\begin{document}
Still there:
\begin{tikzpicture}
\draw[fill=red] (0,0)rectangle(2,2);
\end{tikzpicture}

The black hole:
\draw[left color=red, right color=blue] (2,0) rectangle (2,2);
\end{tikzpicture}

A picture lost in the black hole:
\begin{tikzpicture}
\draw[fill=blue] (0,0)rectangle(2,2);
\end{tikzpicture}

Some text lost in the black hole.
\end{document}


There are no errors in the log. The black hole ends with the page. I get it with all engines. The pdf opens without problem but gsview complains and don't open the ps.

I made a bug report but perhaps someone here is interested to find out what's going on.

-
A red/blue shaded black hole! –  Hans-Peter E. Kristiansen Mar 27 '13 at 14:28
I was rather disappointed that the black hole didn't eat anything in my tests... You can see yourself here. +1 nevertheless for the funny title and description –  JLDiaz Mar 27 '13 at 14:34
@JLDiaz: It seems to depend on the viewer. I get it with reader 8 + 9 but not with sumatra. –  Ulrike Fischer Mar 27 '13 at 14:47
I don't get a "black hole" with evince. Just a zero width rectangle. –  Toscho Mar 27 '13 at 14:57
The question title would be better for April 1st. :-) –  Martin Schröder Apr 2 '13 at 20:09

I think that the problem is that you set the x dimension of the second rectancular at 0. Try this:

\documentclass{article}
\usepackage{tikz}

\begin{document}
Still there:
\begin{tikzpicture}
\draw[fill=red] (0,0)rectangle(2,2);
\end{tikzpicture}

The black hole: