I am trying to shift an angled line but I can't seem to determine the correct method.
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
\coordinate (vp) at (10cm, 3cm);
\draw (1cm, 0) -- ($(1cm, 0)!2cm!(vp)$) coordinate (a);
% I want the line parallel to the line above
\begin{scope}[xshift = 0.5cm] % incorrect
\draw[|<->|] (1cm, 0) -- (a);
\end{scope}
\begin{scope}[yshift = 0.5cm] % incorrect
\draw[|<->|] (1cm, 0) -- (a);
\end{scope}
% incorrect
\draw[|<->|] ($(1cm, 0) + (-45:0.25cm)$) -- ($(a) + (-45:0.25cm)$);
\end{tikzpicture}
\end{document}
Aucun commentaire:
Enregistrer un commentaire