I am trying to uncover parts of a PDF (available here) frame by frame (i.e., rectangle 1 on one frame, rectangle 2 on next frame and so on) using TikZ
. However, I am having difficulty in referencing unconventional node positions. How do I reference positions shown by the red 'X' marks? I know the black 'X' marks can be accessed by north, south, north east, etc. How do I access the nodes marked in red 'X' marks such that I can uncover the PDF frame by frame?
Slide
MWE
\documentclass{beamer}
\usepackage{tikz}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (B) at (4,0) {\includegraphics[height=0.72\textheight,keepaspectratio]{tikz_rectangle.pdf}};
\only<1>
{
\fill [draw=none, fill=white, fill opacity=0.8] (B.north west) -- (B.north east) -- (B.south east) -- (B.south west) -- (B.north west) -- cycle;
}
\only<2>
{
\fill [draw=none, fill=white, fill opacity=0.0] (B.north west) -- (B.north east) -- (B.south east) -- (B.south west) -- (B.north west) -- cycle;
}
\only<3>
{
\fill [draw=none, fill=white, fill opacity=0.8] (B.north) -- (B.north east) -- (B.322) -- (B.218) -- (B.140) -- (B.110) -- (B.north) -- cycle;
}
\only<4>
{
\fill [draw=none, fill=white, fill opacity=0.8] (B.north) -- (B.north east) -- (B.322) -- (B.218) -- (B.west) -- (B.150) -- (B.center) -- (B.110) -- cycle;
\fill [draw=none, fill=white, fill opacity=0.8] (B.120) -- (B.center) -- (B.110) -- cycle;
}
\end{tikzpicture}
\end{frame}
\end{document}