Skip to content

Conversation

@ekanSSS
Copy link

@ekanSSS ekanSSS commented Apr 14, 2014

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

example of set :

add linear gradiant color with parameter bgcolormid/bgcolorend fgcolormid/fgcolorend
@hmaidasani
Copy link

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

@pratham2003
Copy link

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?

@ekanSSS
Copy link
Author

ekanSSS commented Sep 19, 2016

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

@sazzad2324
Copy link

works like a charm!! thanks @ekanSSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants