As an example, I wish to draw two segments, one in blue, one in red.
\begin{tikzpicture}
\draw [color=blue](0,0)--(1,1);
\draw [color=red](1,0)--(0,1);
\end{tikzpicture}
I wish I could issue only one draw or path command such as this (the path is computed externally) :
\begin{tikzpicture}
\draw [color=blue] (0,0)--(1,1) [color=red] (1,0)--(0,1)
\end{tikzpicture}
But this will draw two red lines since "color" is global to the path and the red color will supercede the blue color in the whole path.
Is there a path command, let's say \stop, that would make
\draw [color=blue] (0,0)--(1,1) \stop [color=red] (1,0)--(0,1);
equivalent to
\draw [color=blue] (0,0)--(1,1);
\draw [color=red] (1,0)--(0,1);
?
P.S. 1 : the external program can then produce a single phrase : "[color=blue] (0,0)--(1,1) \stop [color=red] (1,0)--(0,1);" I can put behind the "\draw" command.
P.S. 2 : without entering too much details, it is difficult to make the program produce "\draw" because during the transfer to Latex, it is interpreted by Latex not Tikz.
\stop
command may defined as; \draw
...