Consider the following example using the angles
library and a pic
path to mark an angle:
\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{angles,decorations.markings}
\begin{document}
\begin{tikzpicture}[
>=latex,
decoration={
markings,
mark= at position 0.5 with
{
\arrow{<}
}
}
]
\draw
(2,1) coordinate (A) node[label={right:$A$}] {} --
(0,0) coordinate (B) node[label={left:$B$}] {} --
(2,-1) coordinate (C) node[label={right:$C$}] {}
pic[->,draw=red,angle radius=1cm] {angle={C--B--A}};
\draw[<-] (3,1) -- (3,-1);
% The problem is here; pic doesn't seem to obey the decoration
\begin{scope}[yshift=-3cm]
\draw
(2,1) coordinate (A) node[label={right:$A$}] {} --
(0,0) coordinate (B) node[label={left:$B$}] {} --
(2,-1) coordinate (C) node[label={right:$C$}] {}
pic[draw=red,angle radius=1cm,postaction=decorate] {angle={C--B--A}};
\draw[postaction=decorate] (3,1) -- (3,-1);
\end{scope}
\end{tikzpicture}
\end{document}
The result is:
The image on top shows an angle marked using a red arc with an arrow in one end; in the image on the bottom I tried to use a decoration to add the arrow in the middle of the arc, but the postaction=decorate
option was ignored; the straight lines to the right are not relevant and are only there for comparison: a simple \draw
path obeys the decoration.
What's the proper way to use a decoration for an arc created using the angle
pic?