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

Cairo's gradient transforms are inverted #157

Open
moazin opened this issue May 25, 2021 · 0 comments
Open

Cairo's gradient transforms are inverted #157

moazin opened this issue May 25, 2021 · 0 comments

Comments

@moazin
Copy link
Collaborator

moazin commented May 25, 2021

A transform on the gradient gets inverted in the Cairo port.

Consider the following document:

<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="glyph99" viewBox="0 0 1000 1000">
  <defs>
    <linearGradient id="grad" gradientUnits="userSpaceOnUse" gradientTransform="translate(200 200)" x1="100" y1="100" x2="400" y2="400">
      <stop offset="0" stop-color="red" />
      <stop offset="1" stop-color="blue" />
    </linearGradient>
  </defs>
  <rect x="100" y="100" width="500" height="500" fill="url(#grad)"/>
</svg>

Have a look at the following renderings.

Librsvg
image
SNV (Cairo)
image
SNV (Skia)
image

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