Using beamer , I would like to highlight a part of an image using a spotlight (circular, or rectangular) as shown below:
How can I achieve that in beamer?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityYou could reuse a variation of my answer here based on Jake's solution there.
\documentclass{beamer}
\usepackage{tikz}
% From https://tex.stackexchange.com/a/445311/141947
\tikzset{
use page relative coordinates/.style={
shift={(current page.south west)},
x={(current page.south east)},
y={(current page.north west)}
},
}
\begin{document}
\begin{frame}{title}{subtitle}
\begin{block}{Block title}
Some content
\end{block}
\includegraphics[width=0.5\textwidth]{example-image-a}
\begin{tikzpicture}[remember picture,overlay,use page relative coordinates]
\fill[opacity=0.5,black] (0,0) rectangle (1,1) (0.25,0.5) circle (2cm);
\end{tikzpicture}
\end{frame}
\end{document}