1

I have tried to answer the question from TikZ: changing colour of a path half way along with decorations - unsuccessfully. Maybe it is not possible!?

Can someone tell me why scoped path color change is not implemented?

  • 3
    Can you elaborate on what you mean "unsuccessfully". The accepted answer worked for me without any modification. Perhaps you are using a older version of the libraries. I am using the latest version of TeXLive2011 (updated today). – Peter Grill Oct 21 '11 at 23:31
  • Yes there is no problem with the answer, but I was hoping that there was a highlevel solution, that did not involve doing the calculations yourself. I did mange to change the color, but at the same time the path was broke in two with no nice joining. – hpekristiansen Oct 24 '11 at 16:44

1 Answers1

2

Scoped path colour is not implemented simply because it cannot be assumed to be implemented in the final document. The lines and so forth in TikZ/PGF are written into the document using the document's method of drawing lines. Since PDF, PostScript, SVG, and so forth have native ways of drawing lines, TikZ/PGF uses those. Since TikZ/PGF tries to be backend-agnostic, it can only truly support those features that are common to all backends. My guess is that for PDF and SVG, it isn't possible to change the colour of a path halfway (pretty sure about SVG, not so sure about PDF, don't know about PostScript). So since the backends can't cope with it, neither can TikZ/PGF.

Andrew Stacey
  • 153,724
  • 43
  • 389
  • 751