desenhar uma imagem com coordenada absoluta no beamer

desenhar uma imagem com coordenada absoluta no beamer

Às vezes eu quero fazer um desenho com coordenadas absolutas beamer. mas o exemplo abaixo parece ter algum deslocamento ao desenhar um círculo. Como posso desenhar uma imagem em uma coordenada absoluta?

Código atual:

\documentclass[t]{beamer}
\usepackage{tikz}

\setbeamertemplate{background canvas}{%
    \begin{tikzpicture}
    \fill[color=orange!10] (0,0) rectangle (\paperwidth,\paperheight);
    \draw[step=1.0,black,thin] (0,0) grid (\paperwidth,\paperheight);
    \end{tikzpicture}}

\begin{document}
    \begin{frame}[t]{Title here}
    \begin{tikzpicture}[very thick]
    \def\r{2}
    \def\x0{5}
    \def\y0{5}
    \draw[fill=black] (\x0,\y0) circle (5pt);
    \draw (\x0,\y0) circle (\r);
    \draw [->] (\x0,\y0) -- (\x0+\r,\y0);
    \end{tikzpicture}
    \end{frame}
\end{document}

Desejo desenhar um círculo em (5,5), mas a saída atual é:

insira a descrição da imagem aqui

Responder1

Então você precisa mudar para overlay,remember pictureo modo e mudar sua imagem em relação à página. Então compile vezes suficientes

\documentclass[t]{beamer}
\usepackage{tikz}

\setbeamertemplate{background canvas}{%
    \begin{tikzpicture}
    \fill[color=orange!10] (0,0) rectangle (\paperwidth,\paperheight);
    \draw[step=1.0,black,thin] (0,0) grid (\paperwidth,\paperheight);
    \end{tikzpicture}}

\begin{document}
    \begin{frame}[t]{Title here}
    \begin{tikzpicture}[very thick,overlay,remember picture]
    \def\r{2cm}\def\x0{5cm}\def\y0{5cm}
    \begin{scope}[shift={(current page.south west)}]
    \draw[fill=black] (\x0,\y0) circle (5pt);
    \draw (\x0,\y0) circle (\r);
    \draw [->] (\x0,\y0) -- (\x0+\r,\y0);
    \end{scope}
    \end{tikzpicture}
    \end{frame}
\end{document}

insira a descrição da imagem aqui

informação relacionada