
특정 픽셀 이미지를 확대하기 위해 TikZ
라이브러리를 사용해 보았습니다 . spy
여기에서는 스코프의 좌표에 관한 문제에 대해 스코프와 빨간색을 사용하여 이미지를 그립니다.
상대 범위 좌표로 표현된 TikZ 스파이로 그림의 일부를 확대합니다.
내 문제는 그 스파이가 요점을 파악하고 있는 것 같다는 거야~에이미지는 올바르게 표시되지만 확대할 잘못된 부분을 선택합니다(예: MWE).
\documentclass[german,10pt,xcolor=colortbl,compress]{beamer}
\usepackage{xunicode}
\usepackage{calc}
\usepackage{graphicx,tikz}
\usetikzlibrary{spy,calc}
\RequirePackage[no-math]{fontspec}
\RequirePackage{xltxtra}
\setbeamertemplate{navigation symbols}{}
\begin{document}
\begin{frame}{Example}{Spy on Images in Beamer}
\begin{tikzpicture}[spy using outlines={circle,size=.1\textwidth, magnification=3, connect spies}]
\node[anchor=south west,inner sep=0pt] (image) at (0,0) {%
% \includegraphics[height=.5\textwdth]{exampleA}
\begin{tikzpicture}
\draw[draw=blue,fill=green!50] (0,0) rectangle (.5\textwidth,.5\textwidth);
\shade[top color=black, bottom color=white] (.25\textwidth,.25\textwidth) rectangle (.5\textwidth,.5\textwidth);
\end{tikzpicture}
};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
% Draw besides image
\shade[top color=red, bottom color=blue] (1.025,.66) rectangle (1.075,1);
\node (spy1) at (128/256,192/256) {};
\coordinate (spyto1) at (-.5,.75);
\spy [black,thick] on (spy1) in node at (spyto1);
\node (spy2) at (256/256,224/256) {};
\coordinate (spyto2) at (-.5,.25);
\spy [black,thick] on (spy2) in node at (spyto2);
\end{scope}
% Adress a point in “pixels”
\end{tikzpicture}
\end{frame}
\end{document}
배율은 음영에 대한 녹색 부분의 경계선에서 직접적으로 이루어져야 합니다. 그럼에도 불구하고 확대율에는 녹색만 표시되고 두 번째 것을 가지고 놀고 있는데 왼쪽 하단의 양방향에서 벗어난 것 같습니다.
확대 과정에 대한 정보를 얻을 수 있는 방법이 없으므로 계산이 여전히 일부 잘못된 영향을 받는 단서가 있습니다.범위가 지정된좌표가 매우 도움이 될 것입니다.
편집하다:Andrew가 언급했듯이 이 문제는 TikZ/PGF 3.0에서 수정되었습니다(현재 저에게도 마찬가지입니다). 여기서 무엇이 잘못되고 있는지 자세히 설명할 수 있는 사람이 있다면 자유롭게 공유해 주세요.