1.6.12

In a beamer slide highlight a region of an image with a rectangle overlay

You can include the picture into a TikZ node and then draw some rectangles over it. For example, 

\documentclass{beamer}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\begin{document}
\begin{frame}
    \frametitle{ESR1} 

    \begin{center}
        Functional analysis
    \end{center}

    \begin{center}
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=1\textheight]{some_image.jpg}};
            \draw<1>[red,ultra thick,rounded corners] (1.6,1) rectangle (\textheight-1cm,5);
            \draw<2>[red,ultra thick,rounded corners] (5.7,4.1) rectangle (7.5,4.9);
        \end{tikzpicture}
    \end{center}
\end{frame}
\end{document}

with a picture from Wikipedia as some_image.jpg gives the two slides
example
Note the \node[anchor=south west,inner sep=0] at (0,0) {\includegraphics{...}};line. This adds the picture so that the lower left corner is at the origin of the TikZ coordinate system. Section 14.6 “Rounding Corners” of the TikZ manual (v2.10) tells you how you can change the corner rounding.

No hay comentarios:

Publicar un comentario