有没有一种样式可以禁用blur shadow
已启用的?只需添加以下选项即可轻松禁用draw
和更改:fill
draw=none, fill=yellow
但没有看到一种可行的方法来禁用现有的blur shadow
。
笔记:
- 一个解决方案是定义
\MyPicture*
一个暂时禁用 pgfplots 中的 Tikz 阴影但我更喜欢用一种风格来做这件事,没有改变\MyPicture
代码:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\newcommand*{\MyPicture}[1][]{%
%% #1 = draw options.
\begin{tikzpicture}
\node [draw=red, thick,fill=magenta!25, blur shadow, #1] {Text};
\end{tikzpicture}%
}%
\begin{document}
\MyPicture
\quad
\MyPicture[draw=none, fill=yellow, blur shadow={}]% <-- How to disable shadow here
\end{document}
答案1
您可以更改shadow opacity
参数:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\newcommand*{\MyPicture}[1][]{%
%% #1 = draw options.
\begin{tikzpicture}
\node [draw=red, thick,fill=magenta!25, blur shadow, #1] {Text};
\end{tikzpicture}%
}%
\begin{document}
\MyPicture
\quad
\MyPicture[draw=none, fill=yellow, blur shadow={shadow opacity=0}]% <-- How to disable shadow here
\end{document}