Angular gradients in JGraphics

Feb 18, 2009 at 8:54pm

Angular gradients in JGraphics

Hi there,

what’s the best way to create angular gradients in JGraphics?
With angular gradients I mean color that smoothly fades according to a certain angle.

For instance, let’s imagine to have a circle, of which 0 degrees is the topmost point and 90 degrees the rightmost point.
I would like a gradient that smoothly sweeps from 0 to 90 degrees.

This link might explain you better what I mean:

http://iit.bloomu.edu/vthc/Photoshop/DRAWING/gradients.htm

Does JGraphics offer a set way to do that like it happens for linear and radial gradients?

Any advice highly appreciated.

Thanks.

- Luigi

#42385
Feb 18, 2009 at 11:24pm

Hi,

You can do that in jgraphics. There is an example in uitester example in the latest SDK (mode 7, in the snippet_gradient() method).

HTH,
ej

#151706
Feb 19, 2009 at 6:58am

Thanks Emmanuel for your reply.

The uitester.c example shows how to create linear and radial gradients.

What I am asking is how to create angular gradients.

I think the best way to understand what I mean with angular gradients is to see a picture of it.

Please go to this site and scroll down to angular gradient:

http://iit.bloomu.edu/vthc/Photoshop/DRAWING/gradients.htm

I don’t think an angular gradient example is anywhere in the SDK, but I would love to see a coded example for sure.

Thanks for any help.

- Luigi

#151707

You must be logged in to reply to this topic.