tags:

views:

676

answers:

2

I need to replicate a circular (or angle) gradient from a Photoshop comp in WPF; so far I can only find linear and radial. Does anyone know if such a thing exists, or and easy way to get get a circular gradient in WPF?

Note: I'm not asking about a radial gradient. A circular gradient is like taking a rectangle, applying a gradient and then transforming the rectangle into a circle.

A: 

While I've never done this before (so I don't know what's involved) you could implement a type that inherits from GradientBrush. I don't think this is trivial though.

I've also not worked with Photoshop circular gradients, but from your description I can't help but think that you could at least approximate it using a LinearGradientBrush and then transforming the result - perhaps using a MatrixTransform.

Sorry that I can't give you concrete answers, but maybe these suggestions can point you in the right direction.

dariom
Yes, well, I was hoping to not have to write all of that. Kind of a bummer that doesn't appear to be there.
Scott
A: 

Check this question for a new and a bit more complete answer to this question.

Beska