jQuery-Knob icon indicating copy to clipboard operation
jQuery-Knob copied to clipboard

Adding linear gradient

Open ekanSSS opened this issue 12 years ago • 4 comments

add a color gradient with bgcolormid/bgcolorend and fgcolormid/fgcolorend parameter that correspond to the transitional color and gradient end color.

example of set :

ekanSSS avatar Apr 14 '14 14:04 ekanSSS

Doesn't really work with varying data-angleOffset and data-angleArc for me.

hmaidasani avatar Apr 10 '15 21:04 hmaidasani

I didn't test data-angleArc or data-angleOffset but here is a preview of what the foreground gradient looks like in case someone stumbles upon this..

Preview I had to set the width and height of the knob equally (square).

P.S. I don't know much about canvas but I noticed that the arc was divided into 2 parts, start-mid and mid-end. Is this because the linear gradient actually strokes the full canvas and not the path alone?

pratham2003 avatar Sep 19 '16 12:09 pratham2003

If my memories are good (it was 2 years ago from now) data-angleArc or data-angleOffset don't work.

Yeah I need too use 2 canvas because normaly, linear gradient only take one direction (top, left, right or bottom) so it doesn't a circle gradient: Exemple with one linear gradient

ekanSSS avatar Sep 19 '16 13:09 ekanSSS

works like a charm!! thanks @ekanSSS

sazzad2324 avatar Mar 27 '19 14:03 sazzad2324