Four corner Gradient

Prashant Saxena wrote:

'GradientFillLinear' creates a rectangle but only supports two colors.

How can I draw a gradient rectangle where I can specify four different colors, one for each corner. Similar to photoshop color chooser.

You'll probably need to do the gradient calculations yourself.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

You could get away with doing half the job: use GradientFillLinear to draw stripes, computing the endpoint colors yourself by interpolating between the corners.

--Ned.
http://nedbatchelder.com

Robin Dunn wrote:

···

Prashant Saxena wrote:

'GradientFillLinear' creates a rectangle but only supports two colors.

How can I draw a gradient rectangle where I can specify four different colors, one for each corner. Similar to photoshop color chooser.

You'll probably need to do the gradient calculations yourself.

--
Ned Batchelder, http://nedbatchelder.com