# tikzpicture has different arrow tip colors in pdf output and dvi output

i have the following mwe

\documentclass[tikz,border=4pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=angle 45,scale=3,ultra thick]
\draw[help lines] (-.1,-.9) grid (1.1,.1);
\draw[>=triangle 60,fill=red,draw=teal](0,-0.1)--++(1,0);
\draw[>=latex,fill=blue,draw=violet](0,-0.2)--++(1,0);
\draw[>=stealth,fill=blue,draw=violet](0,-0.3)--++(1,0);
\draw[](0,-0.4)--++(1,0);
\draw[draw=cyan](0,-.5)--++(1,0);
\draw[draw=orange](0,-.6)--++(1,0);
\end{tikzpicture}
\end{document}


the compiled pdf file is expected as follows,

but the compiled dvi file have different arrow tip color,

after commenting one line

\documentclass[tikz,border=4pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}
\begin{tikzpicture}[->,>=angle 45,scale=3,ultra thick]
\draw[help lines] (-.1,-.9) grid (1.1,.1);
\draw[>=triangle 60,fill=red,draw=teal](0,-0.1)--++(1,0);
\draw[>=latex,fill=blue,draw=violet](0,-0.2)--++(1,0);
\draw[>=stealth,fill=blue,draw=violet](0,-0.3)--++(1,0);
% \draw[](0,-0.4)--++(1,0);
\draw[draw=cyan](0,-.5)--++(1,0);
\draw[draw=orange](0,-.6)--++(1,0);
\end{tikzpicture}
\end{document}


the output pictures are normal and consistant again,

is there anything special about the commented line, or that is just a bug somehow? i was think of exploiting that to change the arrow tip color only without resorting to the advanced decoration option. now it seems that changing color of angle 45 type arrow tip is indeed trickier than latex/stealth type.

-
Can you try the commented line without the empty [] and also converting draw to path? –  percusse Oct 7 '13 at 7:35
I understand there's no real color stack in .dvi viewers (which one are you using?), which may (or may not) be related to your problem. –  Koji Oct 7 '13 at 8:43
@percusse, thanks for the suggestion. if i changd the commented line into \draw(0,-0.4)--++(1,0); the problem still exists, it is the same as \draw(0,-0.4)--++(1,0); if i try \path(0,-0.4)--++(1,0); nothing is drawn for this line of code as expected, since the draw option is not specified. i guess div will be obsolete in the future? –  davyjones Oct 7 '13 at 8:49
@Koji, i used Yap. the color stack stuff are really stranger to me, but i'll test the result on linux later. thanks very much! –  davyjones Oct 7 '13 at 9:01
I expand: dvi files do not contain any color or grahics per se; what they can contain are specials. These specials are there for the benefit of post processing backend software; like dvips, dvipdfm or the integrated pdf backend of pdflatex. However, many dvi viewers will give it a shot to interpret some specials. Color changes are hard to implement, you need a whole color stack to pop and push colors at the appropriate moments (consider a color change inside floating material). Hence, many dvi viewers fail some of the time. Finally, tikz is really meant only for pdf/ps, not dvi. –  Koji Oct 7 '13 at 9:24

.dvi files do not contain any color or graphics per se; what they can contain are specials. These specials are there for the benefit of post-processing backend software; like dvips, dvipdfm or the integrated pdf backend of pdflatex.
However, many dvi viewers will give it a shot to interpret some specials. Color changes are hard to implement, you need a whole color stack to pop and push colors at the appropriate moments (consider a color change inside floating material). Hence, many dvi viewers fail some of the time. Finally, Tikz is really meant only for pdf/ps, not dvi.