Tikzset 样式禁用模糊阴影

Tikzset 样式禁用模糊阴影

有没有一种样式可以禁用blur shadow已启用的?只需添加以下选项即可轻松禁用draw和更改:fill

draw=none, fill=yellow

但没有看到一种可行的方法来禁用现有的blur shadow

在此处输入图片描述

笔记:

代码:

\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}

在此处输入图片描述

相关内容