vector_graphics icon indicating copy to clipboard operation
vector_graphics copied to clipboard

Overdraw optimization can leave artifacts

Open dnfield opened this issue 3 years ago • 1 comments

This svg:

<svg xmlns="http://www.w3.org/2000/svg" 
    xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="57 42 20 20">
    <g>
        <g>
            <path d=" M 77 49.767 L 74.095 49.767 L 74.095 44.905 L 69.233 44.905 L 69.233 42 L 77 42 L 77 49.767 Z " fill="rgb(111,161,234)"/>
            <rect x="70.937" y="42.145" width="2.905" height="8.93" transform="matrix(-0.707,-0.707,0.707,-0.707,90.618,130.756)" fill="rgb(111,161,234)"/>
        </g>
    </g>
</svg>

image

dnfield avatar Oct 03 '22 19:10 dnfield

In this case, because the paths are the same color, we could safely merge them instead of creating distinct ones. If they were different colors, we could not and would end up with these AA related issues.

dnfield avatar Oct 03 '22 21:10 dnfield