考虑以下代码:
\documentclass[border=12pt]{standalone}
\usepackage{pstricks}
% Compiles with Xelatex
\begin{document}
%\psset{unit=2}
\begin{pspicture} %[showgrid=true]
(-3,-3)(9,9)
\psframe*[linecolor=brown](-3,-3)(9,9)
\psclip{%
\pscustom[linestyle=none,dimen=middle]{%
\psline(6,0)(6,3)
\psarc(3,3){3}{0}{180}
\psline(0,0)
}}
\psframe*[linecolor=red](-3,-3)(9,9)
\endpsclip
\end{pspicture}
\end{document}
产生图片
问题:是否有可能产生一种逐渐褪色(本例中为微红色)的光辉,如果你愿意的话可以称之为一种光环,它从特定图像(本例中为给定的红色诺曼窗)发出并具有该图像的形状?如果可以,如何实现?
谢谢。
答案1
\documentclass[border=12pt]{standalone}
\usepackage{pst-slpe}
% Compiles with lualatex or Xelatex
\begin{document}
%\psset{unit=2}
\begin{pspicture} %[showgrid=true]
(-3,-3)(9,9)
\psframe*[linecolor=brown](-3,-3)(9,9)
\psclip{%
\pscustom[linestyle=none,dimen=middle]{%
\psline(6,0)(6,3)
\psarc(3,3){3}{0}{180}
\psline(0,0)
}}
\psBall(4,2){red}{6cm}
\endpsclip
\end{pspicture}
\begin{pspicture} %[showgrid=true]
(-3,-3)(9,9)
\psframe*[linecolor=brown](-3,-3)(9,9)
\psclip{%
\pscustom[linestyle=none,dimen=middle]{%
\psline(6,0)(6,3)
\psarc(3,3){3}{0}{180}
\psline(0,0)
}}
\psframe[fillstyle=radslope](9,9)
\endpsclip
\end{pspicture}
\end{document}