我希望你们能帮助我。我尝试在图像上创建淡入淡出镜像效果。到目前为止,它正在工作,但我希望镜像已经处于半透明(可调)状态。
\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{graphicx}
\usetikzlibrary{shadows,fadings}
\begin{document}
\pagecolor{black}
\begin{tikzpicture}[remember picture, overlay]
\def\nodeshadowed[#1]#2;{\node[scale=1,above,#1]{#2};\node[scale=1,
above,#1,yscale=-1, outer sep=5pt, scope fading=south, opacity=0.3]{#2};}
\nodeshadowed [at={( 6,-7 )}] {\fbox{\includegraphics[height=0.5\textheight]{ente.jpg}}};
\end{tikzpicture}
\end{document}
答案1
我不确定这是否意味着,但定义淡入淡出样式,例如middle
,将提供淡入淡出到中间的效果。请注意,由于镜像top
和bottom
是反转的。
\documentclass{article}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{graphicx}
\usetikzlibrary{shadows,fadings}
\begin{document}
\pagecolor{black}
\tikzfading[name=middle,
top color=transparent!0, %completely faded out
bottom color=transparent!100, % use original colour
middle color=transparent!100]
\begin{tikzpicture}[remember picture, overlay]
\def\nodeshadowed[#1]#2;{%
\node[scale=1,above,#1]{#2};
\node[scale=1,above,#1,yscale=-1, outer sep=5pt,scope fading=middle, opacity=0.3]{#2};}
\nodeshadowed [at={( 6,-7 )}] {\fbox{\includegraphics[height=0.5\textheight]{ente.jpg}}};
\end{tikzpicture}
\end{document}