我正在尝试使用 TikZ 淡入淡出来实现镜像/反射效果,但我目前能够实现的淡入淡出太“温和”了 - 线条淡入淡出,但所有线条都保留了下来。线条的反射本身处于正确的位置,但淡入淡出的强度不够 - 我希望线条很快消失。
这是我的 MWE:
\documentclass[11pt,twoside]{book}
\usepackage{tikz}
\usetikzlibrary{fadings}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{
paperwidth=17.78cm,
paperheight=25.4cm,
marginparsep=6.35mm,
top=.5cm, % Top margin
bottom=1cm, % Bottom margin
left=2cm, % Left margin
right=2cm, % Right margin
}
% Adds bleed
\usepackage[
width=18.0975cm,
height=26.035cm,
center,
%cam,
%cross,
%frame
]{crop}
\begin{document}
\begin{titlepage}
\pagecolor{orange}\afterpage{\nopagecolor}
\begin{tikzpicture}
\draw[overlay, white, line width=1.1mm] (-3,-.35) .. controls (-2.5,-4.5) and (5,-3.5) .. (20,.5);
\begin{scope}[shift={(0,-6.15)},xscale=1,yscale=-1,rotate=360]
\draw[overlay, white, line width=1.1mm,path fading=south] (-3,-.35) .. controls (-2.5,-4.5) and (5,-3.5) .. (20,.5); % Mirror Image
\end{scope}
\end{tikzpicture}
\end{titlepage}
\end{document}
由此产生了如下结果:
这就是我想要达到的效果:
使用 TikZ 可以实现我想要的效果吗?
非常感谢您提前提供的任何帮助。
答案1
你可以查阅原始南方淡入的定义pgflibraryfadings.code.tex
来找到
\pgfdeclareverticalshading{pgf@lib@fade@south}{100bp}
{color(0bp)=(pgftransparent!100); color(25bp)=(pgftransparent!100);
color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}%
\pgfdeclarefading{south}{\pgfuseshading{pgf@lib@fade@south}}%
我所做的就是换成color(25bp)=(pgftransparent!100);
在color(40bp)=(pgftransparent!100);
渐隐中我呼叫South
的
\documentclass[11pt,twoside]{book}
\usepackage{tikz}
\makeatletter
\pgfdeclareverticalshading{pgf@lib@fade@South}{100bp}
{color(0bp)=(pgftransparent!100); color(40bp)=(pgftransparent!100);
color(75bp)=(pgftransparent!0); color(100bp)=(pgftransparent!0)}%
\pgfdeclarefading{South}{\pgfuseshading{pgf@lib@fade@South}}%
\makeatother
\usetikzlibrary{fadings}
\usepackage{afterpage}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{
paperwidth=17.78cm,
paperheight=25.4cm,
marginparsep=6.35mm,
top=.5cm, % Top margin
bottom=1cm, % Bottom margin
left=2cm, % Left margin
right=2cm, % Right margin
}
% Adds bleed
\usepackage[
width=18.0975cm,
height=26.035cm,
center,
%cam,
%cross,
%frame
]{crop}
\begin{document}
\begin{titlepage}
\pagecolor{orange}\afterpage{\nopagecolor}
\begin{tikzpicture}
\draw[overlay, white, line width=1.1mm] (-3,-.35) .. controls (-2.5,-4.5) and (5,-3.5) .. (20,.5);
\begin{scope}[shift={(0,-6.15)},xscale=1,yscale=-1,rotate=360]
\draw[overlay, white, line width=1.1mm,path fading=South]
(-3,-.35) .. controls (-2.5,-4.5) and (5,-3.5) .. (20,.5); % Mirror Image
\end{scope}
\end{tikzpicture}
\end{titlepage}
\end{document}
而50bp
不是40bp
你得到