reactjs / react-art

React Bridge to the ART Drawing Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stroke gradients?

ThomWright opened this issue · comments

According to this, gradients on strokes as well as fills are supported in SVG.

Is 'advanced stroke colors' a reference to gradients? Is there a reason they aren't supported?

I'm pretty noob at SVG, but I'm using strokes to draw lines (strokeJoin is nice), and it would be really useful to be able to add gradients, rather than switching to using fill.

If this is something that could feasibly be done I'm happy to put some effort into it, but it would be easier with some help from someone who knows what they're doing 😄

(While I'm here, how come issues aren't enabled on art?)

This is explicitly disabled because there is no way to do the equivalent in IE8's VML. ART tries hard to provide a common subset that works across any environment. IE8 is dying but once that's true there are perhaps more advanced features that could be enabled.

(Issues aren't enabled on art because it's technically a "fork" according to GitHub.)

Thanks for the explanation, appreciate it. IE8 never fails to make me unhappy... 😞

(Gotcha. One would expect GitHub to handle that more gracefully.)

Is IE 8 dead yet so we can get stroke gradients? This limitation is bubbling across to react native.

I'd be ok enabling this if we got one (or several) PRs for enabling it for SVG, Canvas, React Native Android and React Native iOS. Should be fairly easy.

Ok cool! I'll get to work on RN first.
Here's what a quick google search found if others are interested in helping:
SVG
Canvas
iOS
Android

Ok, canvas is the main issue here. There's no way to do other than splitting the path up into sub sections it seems. Would you be ok with something like that in the code?