tikz 文本节点的模糊边框

tikz 文本节点的模糊边框

我正在尝试使用 tikz 绘制以下图像 -

在此处输入图片描述

实际情况是,文本框看起来就像对象矩阵顶部的一层。我想让它们看起来就像在同一层中一样。如果我能够淡化文本框周围的边框并使它们变得模糊(逐渐淡化),我想我可以实现这一点。

我尝试使用以下解决方案这个问题,但不起作用。

是否有可能做到这一点?

代码如下 -

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,automata,calc,shapes, positioning,shadows,shadows.blur,shapes.geometric}


\begin{document}

\scalebox{0.5}{
\begin{tikzpicture}
\tikzset{fontscale/.style = {font=\relsize{#1}}}
\newcommand{\mymacro}{
    % Axis
    \draw (-0.1,0) -- (1.0,0);
    \draw (0,-0.1) -- (0,0.5);

    \draw[fill=gray!50] (0.1,0.35) rectangle ++(0.2,0.2);
    \draw[fill=gray!50] (0.2,0.07) rectangle ++(0.4,0.2);

%    \node (rect) at (0.3,0.4) [draw,minimum height=0.05cm,minimum width=0.2cm,fill=gray!50] {};
%    \node (rect) at (0.5,0.2) [draw,minimum height=0.05cm,minimum width=0.3cm,fill=gray!50] {};
};

\begin{scope}
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[xshift=9cm]
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[xshift=18cm]
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[xshift=18cm,yshift=9cm]
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[yshift=9cm]
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[xshift=9cm,yshift=9cm]
\foreach \x in {1,...,9}
{
\foreach \y in {1,...,9}
{
\begin{scope}[xshift=10\x cm,yshift=10\y cm]
        \mymacro
\end{scope}
}
}
\end{scope}

\begin{scope}[xshift=115cm,yshift=110cm]
\node[draw,fill=white,scale=3,rounded corners] (temppicnode) {2 proc., 10 tasks$\approx$ 1000+ solutions};
        \clip (temppicnode.south west) rectangle (temppicnode.north east);
        \pgfmathsetmacro{\mybmax}{sqrt(2)*0.3}
        \pgfmathsetmacro{\mystep}{0.3/(20+1)}
        \pgfmathsetmacro{\myradstep}{sqrt(2)*0.3/(20+1)}
        \foreach \x [evaluate=\x as \mypred using \x-1] in {1,...,20}
        {   \pgfmathsetmacro{\myrad}{\mybmax-(\x-1)*\myradstep}
            \fill[white,even odd rule,opacity=0.1] ($(temppicnode.south west)+(-0.3,-0.3)$) rectangle ($(temppicnode.north east)+(0.3,0.3)$) [rounded corners=\myrad cm] ($(temppicnode.south west)+(\x*\mystep,\x*\mystep)$) rectangle ($(temppicnode.north east)+(-\x*\mystep,-\x*\mystep)$);
        }
        %\draw (temppicnode.north east) rectangle (temppicnode.south west);
        \fill[white,even odd rule] ($(temppicnode.south west)+(-0.3,-0.3)$) rectangle ($(temppicnode.north east)+(0.3,0.3)$) [rounded corners=0.3 cm] (temppicnode.south west) rectangle (temppicnode.north east);
\end{scope}

%\node[draw=none,fill=white,scale=3,text=white,rounded corners] at (115,110) {2 proc., 10 tasks$\approx$ 1000+ solutions};
%\node[draw=none,fill=white,scale=3] at (115,110) {2 proc., 10 tasks$\approx$ 1000+ solutions};

\end{tikzpicture}}
\end{document}

相关内容