-
Notifications
You must be signed in to change notification settings - Fork 113
Description
Brief outline of the bug
In a draw of an arc with the -> decoration, the path is slightly deformed. This is not the case when the draw has no decoration.
I don't know if this is a little bug or a lack of accuracy of TeX, used by TikZ.
In the next code, there is first a thick arc drawn with a thin arc drawn above it. The paths are the same, and the thin arc is perfectly centred.
In the second example, the thick arc has an arrow at the end. We can notice that in the right part of the draw, the thick arc is not exactly centred at the thin arc. This can be show by a zoom.
But in fact, this is more easily shown if we use double. Like above, the not decorated arc is perfectly centred. But the arc with the -> decoration is not perfectly centred.
Code below.
If we zoom in the second arc, we see a perfect centred arc at the begin of the draw:
But not near the end (here, approximately at 75% from the beginning). We see that the above part is greater than the below part.
It's largely more noticeable in the arc with the double:
At begin, it's perfect:
At end, it's less perfect:
Minimal working example (MWE)
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[line width=2pt, yellow!50!cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}
\begin{tikzpicture}
\draw[line width=2pt, ->, cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}
\begin{tikzpicture}
\draw[line width=2pt, double, yellow!50!cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}
\begin{tikzpicture}
\draw[line width=2pt, double, ->, cyan] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\draw[very thin, red] (120:3) arc [start angle=120, end angle=60, radius=3cm];
\end{tikzpicture}
\end{document}