Avoid line between tiled SVG shapes

前端 未结 1 1203
走了就别回头了
走了就别回头了 2020-12-06 16:17

I am using multiple differently colored rectangles to build a SVG data visualization. This works great but sometimes background color bleeds through between the rectangles.

相关标签:
1条回答
  • 2020-12-06 16:29

    This is antialiasing at work between the shape and the background. If you want to turn it off set shape-rendering="crispEdges" on the shapes. You can either set that on the rect elements or on the <svg> in which case the rect elements will inherit it.

    You may be able to adjust the line's positions by adding 0.5 to the co-ordinates. See the cairo FAQ for more details on this.

    0 讨论(0)
提交回复
热议问题