Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Shading a rectangle - the less easy way

807598Jul 18 2006 — edited Jul 19 2006
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 16 2006
Added on Jul 18 2006
4 comments
160 views