servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.6k stars 201 forks source link

Radial gradients have an artifact at their center point #399

Closed Herschel closed 4 years ago

Herschel commented 4 years ago

Radial gradients with a small size have an artifact at their center point when scaled up.

SVG:

<svg viewBox="0 0 2 2" width="400" height="400" xmlns="http://www.w3.org/2000/svg">

    <radialGradient id="gradient"
                    spreadMethod="pad"
                    cx="1" cy="1" r="1"
                    gradientUnits="userSpaceOnUse">
      <stop offset="0%"  stop-color="#ff0000"/>
      <stop offset="100%" stop-color="#000000"/>
    </radialGradient>

  <rect fill="url(#gradient)"
        x="0" y="0" width="2" height="2"/>
</svg>

Pathfinder: image

Expected: image

Revision e75b347

Windows 10 Pro 1909 NVIDIA Geforce RTX 2080 Ti D3D11 backend Also occurs on Macbook AIR 2017 Intel HD 615