There's almost certainly something I'm missing here but I'd like a faded drawing to be defined and placed at various points in the picture. I can get it to look how I want, but when I place it in \begin{scope}[xshift=\x,yshift=\y] environment, the fading doesn't move with the rest of what's in the scope.

Here's a stripped-down example:


    \path(0,0) pic{flame};
        \node[circle,minimum height=4, minimum width=4, fill=\fillcolour,inner sep=0,outer sep=0] at(0,-1){};



\fill[black] (-4,-3) rectangle (6,4);

\node[circle,inner sep=0, outer sep=0, draw=white,very thin] at (0,0){};

\begin{scope}[xshift=0cm, yshift=-0cm]

\begin{scope}[xshift=.1cm, yshift=-0.1cm]

result of above code, heavily cropped

The white circle just indicates the origin. The yellow shaded circle looks right; when I shift it the fading stays behind (as seen from the cyan shaded circle).

  • It seems you have to give all transformations to \pgfsetfading. – Symbol 1 Jan 6 '17 at 15:42
  • @Symbol1 which implies a rewrite to draw a faded item at a particular location, rather than draw and move it. I'll have a try later on – Chris H Jan 6 '17 at 15:51
  • I just proposed an answer. This is by no means the only approach. You can try. – Symbol 1 Jan 6 '17 at 15:52

You may redefine \frame as follows

    \path(0,0) pic{flame};

Here, \pgfgettransform will store the current transformation in \mycurrenttransform and \pgfsettransform will restore it in \pgfsetfading. That is, it now remembers where you are.

| improve this answer | |
  • When I replied to your comment, your answer loaded. This could be very useful elsewhere in this drawing too. Again, I'll have a go later on. – Chris H Jan 6 '17 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.