Shading a rectangle - the less easy way
807598Jul 18 2006 — edited Jul 19 2006Hi all,
I was hoping that somebody may be able to help me in an algorithm for shading a rectangle where there is black at the centre, gradually getting lighter as pixels nearer the edge. I appreciate that to shade a rectangle without using fillRect is simply using nested for loops but the only logic I have used thus far is simply with a fixed colour for each pixel.
Would anybody be willing to share an algorithm (unfortunately not able to use 3D)?
Thanks in advance,
Chris