I'm currently trying to define my coordinates in terms of the image's east/west/south/east coordinates so that I can use the same coordinate system regardless of what image I use. However, when i try to use the \draw [rotate around={20:\O{}}, name path=a] \O{} -- \E{};
in the example below, it does not rotate the path. When instead I use coordinates in the traditional way (5,0)
it rotates it just fine.
I really want to use these relative coordinates since it would mean I wouldn't have to look up the edges each time I do annotations for a new image. How can I make the rotate around
functionality work with relative coordinates?
\documentclass[12pt]{article}
\usepackage{graphicx} % Further formatting of figures
\usepackage{amsmath} % Mathematics
\usepackage{tikz} % Annotated Figures
\usetikzlibrary{intersections} % Detect intersections
\usetikzlibrary{calc} % Calculate distances
\usetikzlibrary{positioning} % Better positioning tools
\usetikzlibrary{arrows.meta} % Better arrowheads
\begin{document}
\begin{figure}[!htb]
\centering
\begin{tikzpicture}
\node[inner sep=0pt] (img) at (0,0)
{\includegraphics[width=\textwidth]{Figures/Airfoil.png}};
%
\def\alph{50};
\def\anglechord{230};
\def\angleradius{95};
\def\O{(img.center)};
\def\E{(img.east)};
\def\W{(img.west)};
\def\N{(img.north)};
\def\S{(img.south)};
\def\SW{(img.south west)};
\def\SE{(img.south east)};
\def\NW{(img.north west)};
\def\NE{(img.north east)};
\def\arrow{{Latex[length=2.8mm]}};
\def\arrowshort{{Latex[length=2mm]}};
% \draw[step=1,black, thick] \SW{} grid \NE{};
\draw[fill] (img.center) circle (0.1);
%
\draw [dashed, very thin, name path=horizontal] \W{} -- \W{};
\draw [dashed, very thin, name path=vertical] \S{} -- \N{};
\path [name path = right] \SE{} -- \NE{};
\draw [rotate around={20:\O{}}, name path=a] \O{} -- \E{};
\end{tikzpicture}
% \caption{caption}
% \label{fig:topconfig}
\end{figure}
\end{document}