According to the pgfmanual, setting options on a clipping path is Not Allowed, so
\clip[fill=red] (0,0) circle (1);
doesn't work. That's all very well, and the above is certainly avoidable.
However, what also doesn't work is when these options are set implicitly, say by providing an every path/.style={fill=red}
on the encompassing scope.
Is there some way to have my path and clip it? That is, is there some way to clear the current global settings on an individual path?
Here's an example of the sort of thing I'd like to be able to do (but can't):
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[every path/.style={fill=red}]
\clip (0,0) -- (1,0) -- (1,1) -- (0,0);
\draw (0,0) rectangle (1,1);
\end{tikzpicture}
\end{document}
(I should emphasise that this is a minimal example: in the actual case, I have lots of paths and lots of different layers and scopes, and would really like to be able to specify the default path style on the main tikzpicture
environment. Even doing this:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\clip (0,0) -- (1,0) -- (1,1) -- (0,0);
\begin{scope}[every path/.style={fill=red}]
\draw (0,0) rectangle (1,1);
\end{scope}
\end{tikzpicture}
\end{document}
would, in the resulting Real World implementation, be irritating.)
In case it helps, I'm using TeXLive 2010 but with pgf dated 2010-07-25.