2

I would like to fill an arrow head with a color, but I have a problem with the fill command :

enter image description here

My code is :

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}
\begin{tikzpicture}

\def \dx{10}
\def \dy{5}
\def \dz{5}

\draw  (0,\dy/4,\dz/2)--++(\dx/8,0,0)--++(0,1,0)[-open triangle 60 reversed];
\draw  (0,-\dy/4,\dz/2)--++(\dx/8,0,0)--++(0,1,0)[-open triangle 60 reversed, fill=blue];

\end{tikzpicture}
\end{document}

but it's not working ... Any clue ?

EDIT :

I have modified my code to use the new library arrows.meta but there is a problem with specific arrow heads like reversed triangle to fill it with a color :

enter image description here

The code :

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{arrows}

\tikzset{
    antenne/.style={
        -{open triangle 60 reversed[fill=blue]}
                },
    ronde/.style={
        -{Circle[fill=blue]}
                },
        }

\begin{document}
\begin{tikzpicture}
    \draw[antenne] (0,0) -- (2,0) -- (2,2) ;
    \draw[ronde] (5,0) -- (7,0) -- (7,2) ;
\end{tikzpicture}
\end{document}

RE-EDIT :

I found the problem, to fill the arrow head I had to replace open triangle 60 reversed[fill=blue] by triangle 60 reversed[fill=blue], the open prevents TikZ from filling the head with a color.

enter image description here

lockstep
  • 250,273
Thomas
  • 1,633

0 Answers0