原理是很粗暴的叠图,加上 (current page.***)
强制定位。
只给出 beamer
文档类的示例,其他的不知道,等@u70550 @u19850 或者 @u73286 出手了。
效果图
原图
\documentclass{beamer}
\setbeamertemplate{navigation symbols}{}
\usepackage[most]{tcolorbox}
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[inner sep=0pt,remember picture,overlay]
\node at (current page.center) {\includegraphics[height=\paperheight]{1}};
\end{tikzpicture}
}
\usepackage{tikzpagenodes}
\def\myglass{4}
\makeatletter
\newtcolorbox{glass}[1][]{%
#1,
enhanced,
remember,
frame hidden,
interior hidden,
fonttitle=\bfseries,
coltitle=black,
underlay={
\begin{tcbclipframe}
\begin{scope}[remember picture,overlay,inner sep=0pt]
\fill[white] (current page.south west) rectangle (current page.north east);
\foreach \x in {-15,-12.5,...,15}{
\foreach \y in {-15,-12.5,...,15}{
\node[opacity=0.05] at ([yshift=\y,xshift=\x]current page.center) {\includegraphics[height=\paperheight]{1}};
}}
\end{scope}
\end{tcbclipframe}
}
}
\makeatother
\begin{document}
\begin{frame}
\begin{glass}[title={My title}]
NEKO NEKO NEKO NEKO NEKO
\end{glass}
\begin{glass}[title={My title}]
MEOW MEOW MEOW MEOW MEOW
\end{glass}
\end{frame}
\end{document}
问 请问latex的tikz如何绘制如下图所示的毛玻璃效果?