wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.24k stars 877 forks source link

SVG colors are changed on edges #1607

Closed mjpolak closed 12 months ago

mjpolak commented 12 months ago

Before you start - checklist

Description

SVG's edges colors are malformed - they are different than expected.

It looks like border shading but, the border is disabled.

image

Steps to reproduce

Add SVG to a page:

    <Svg  style={{ width: "10mm", height: "7mm",backgroundColor:"yellow",borderWidth:0 }} viewBox="0 0 1000 700">
          <Path
            d="M 0 0 Q 0 1 1 1 Q 2 1 2 2"
            stroke={primeColor}
            strokeWidth="0.4"
            transform="translate(175 200)
            scale(250 255)
            "
          />
          <Circle
            cx="175"
            cy="175"
            r="150"
            fill={primeColor}
            stroke="white"
            strokeWidth="25"
          />
        </Svg>

Expected behavior

Edge pixel's color aren't changed.

Actual behavior

Colors on edge pixels are changed.

Additional information

No response

Environment

wojtekmaj commented 12 months ago

It looks like you confused React-PDF with @react-pdf/renderer. Please file an issue in their repo instead.