![如何制作矩形径向辉光](https://linux22.com/image/452045/%E5%A6%82%E4%BD%95%E5%88%B6%E4%BD%9C%E7%9F%A9%E5%BD%A2%E5%BE%84%E5%90%91%E8%BE%89%E5%85%89.png)
考虑一下代码
\documentclass[a5paper,12pt,onecolumn,openany,final]{book}
\usepackage[hmargin=0.7in,vmargin=0.75in]{geometry}
\usepackage{tikz}
\usepackage{calc}
\usetikzlibrary{fadings}
\definecolor{forestgreen}{rgb}{.13, .55, .13}
\definecolor{sunriseyellow}{RGB}{255,219,0}
% I compile this code with Xelatex
\begin{document}
\thispagestyle{empty}
\centering
\tikzfading[name=fade out, inner color=transparent!0,
outer color=transparent!100]
\tikzset{
star/.style={forestgreen, fill=sunriseyellow, path fading=fade out}
}
\begin{tikzpicture}
\clip (-1.65, -2.15) rectangle (1.65, 2.15);
\draw[forestgreen!35!black, shading=mradial, inner color=sunriseyellow!65!white,
middle color=forestgreen!60!black, outer color=forestgreen!35!black]
(-1.65, -2.15) rectangle (1.65, 2.15)
;
\end{tikzpicture}
\end{document}
产生输出
问题:我该如何修改代码,以使径向光晕延伸到整个矩形区域?目前,代码产生圆形径向光晕。(实际上,圆形径向光晕在本例中呈蛋形,因为不是tikzpicture
完美的正方形。)
谢谢。