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

Bezier: Gradients are not positioned correctly #67

Open
Nils1729 opened this issue Jul 5, 2022 · 0 comments
Open

Bezier: Gradients are not positioned correctly #67

Nils1729 opened this issue Jul 5, 2022 · 0 comments
Labels
defect Something isn't working

Comments

@Nils1729
Copy link
Contributor

Nils1729 commented Jul 5, 2022

Since bezier-based rendering goes without using canvas transformations, gradients are also not transformed.
image

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-60 -60 120 120">
<defs>
      <linearGradient id="Gradient1">
        <stop stop-color="red" offset="0%"/>
        <stop stop-color="blue" offset="50%"/>
        <stop stop-color="green" offset="100%"/>
      </linearGradient></defs>
<ellipse fill="url(#Gradient1)" rx="50" ry="50" />
</svg>

This could be fixed either by reintroducing transformations and extracting scale as to not sacrifice too much precision or by implementing linear transforms on gradients or fill styles in general.

@Nils1729 Nils1729 added the defect Something isn't working label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant