Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
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. –  Hans-Peter E. Kristiansen Oct 24 '11 at 16:44

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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