PDA

View Full Version : Multiple stop gradients on a rectangle



TUAWhite
04-08-2009, 05:09 AM
Hello,

I have an question regarding what the best way is to draw a multiple stop gradient on a simple rectangle.

The rectangle would be like a panel, which can have different type of brushes (Solid, Image or gradient). Got the first 2 working nicely, now how would a do the last one.
The 4 points are stored in a list. Would I have to generate an internal texture to do this ?

Can somebody please point me in the right direction.

Thanks a lot in advance

zeoverlord
04-08-2009, 11:59 AM
well there are basically two ways of doing this, one is the texture as you mentioned and the other is subdividing that rectangle in multiple sections so that you have two or more vertics for each color in the gradient.

TUAWhite
04-09-2009, 01:19 AM
Thanks, i'll have a try.