Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradient stroke along path direction #948

Open
dani-ooo opened this issue Jul 4, 2024 · 1 comment
Open

gradient stroke along path direction #948

dani-ooo opened this issue Jul 4, 2024 · 1 comment

Comments

@dani-ooo
Copy link

dani-ooo commented Jul 4, 2024

it would be great to be able to set gradients applied to a path's stroke to follow the direction of the stroke. apps like Adobe Illustrator already have this feature for vector graphics, and there are JS libraries that do it for web as well (see this article).

a behavior just like the <textPath> element. maybe as a direction attribute:

<path stroke="url(#gradient)" stroke-direction="path"/>

or as a orient attribute, currently available for the <marker> element:

<path stroke="url(#gradient)" orient="auto"/>

which could work for other stroke types like pattern and image.
and it could also allow to change the direction of the stroke:

<path stroke="url(#gradient)" stroke-direction="10"/>

<path stroke="url(#gradient)" orient="10deg"/>

<!-- for a 10 degree rotation of the gradient -->
@dani-ooo
Copy link
Author

same proposal for patterns along path strokes. should it be a separate issue?

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

No branches or pull requests

1 participant