答案1
目标图片具有发光或模糊边界的形状。虽然模糊圆圈是标准 tikz 包的一部分,但使任意边界模糊需要更多努力。幸运的是,城里有一个新的游戏,即图书馆nfold
,它极大地帮助了完成这类事情。我写这个“答案”的唯一原因是我想玩这个新工具。人们可以更改参数等。但作为原理证明,结果可能是可以接受的。
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{shadows,nfold,shapes.misc}
\usepackage{fontawesome}
\begin{document}
\begin{tikzpicture}[fuzzy border/.style={save path=\FuzzyBorder,draw=none,append after command=\pgfextra{\begingroup
\path[fill=#1,use path=\FuzzyBorder];
\pgfsetlinewidth{0.2pt}
\foreach \mypathindex in {1,...,10}{\pgfoffsetpathindex{\FuzzyBorder}{0.9pt}{6-\mypathindex}{10}\pgfmathparse{0.55-0.05*\mypathindex}\pgfsetstrokeopacity{\pgfmathresult}%
\pgfusepathqstroke}\endgroup}},
rr/.style n args={3}{alias=rr,rounded rectangle,fuzzy border=#1,inner xsep=4em,inner ysep=1ex,align=left,font=\sffamily,minimum height=3.5em,text=white,append after command={(rr.west)node[right=1ex,circle,circular glow,fill=white,minimum size=2.5em]{#2}
(rr.east)node[left=1ex,text=white]{#3}}}]
\path foreach \Color/\LeftSymbol/\RightSymbol/\Text [count=\Z] in {yellow/\faMobilePhone/\faCamera/30,%
orange/{\faBattery[0]}/\faVideoCamera/40,%
magenta/{\faBattery[1]}/\faRocket/50,%
purple/{\faBattery[2]}/\faSearch/60,%
cyan/{\faBattery[3]}/\faShoppingBasket/70} {
({6*cos(asin((3-\Z)/3))},{1.5*(3-\Z)}) node[rr={\Color}{\LeftSymbol}{\RightSymbol}]{{\large \Text\%}\\[-1ex]{\tiny SERVICE TO BE ADDED} }
};
\end{tikzpicture}
\end{document}
不用说,我并没有特别注意完成这幅画。