0

I have a custom function that creates a tikzpicture that has been rotated via

\begin{tikzpicture}[rotate=angle] 
...
\end{tikzpicture}

where "angle" is an argument to the function so that entire picture may be rotated by an undetermined angle. Within this picture, I have a line that I would like to fadeout from 100% opacity at node (A) to 0% opacity at (B). To do this, I am using the fadings tikzlibrary.

When the angle is at its default value, the point (B) is sitting directly north of point (A), and so this effect can be achieved via

\draw[path fading=north] (A) -- (B); 

However, when the rotate angle given is 90, point (B) now sits east of point (A), and so now the fade direction is incorrect.

It seems to me that this happens because the code rotates the drawn diagram first before applying the fade, when what we need is the other way around.

I want to define a tikzfading style called "outwards", so that the fade direction is specified relatively rather than absolutely. But I have been unable to get this to work.

I would be grateful if anyone had any ideas of how to get this to work

0 Answers0