Drawing grid with jQuery SVG produces 2px lines instead of 1px

后端 未结 3 875
礼貌的吻别
礼貌的吻别 2020-12-28 18:57

I know it\'s not the jQuery SVG library causing this issue, but when rendering horizontal or vertical SVG lines on integral x,y coordinates, lines are 2px wide instead of 1p

3条回答
  •  独厮守ぢ
    2020-12-28 19:12

    Just use a 1px wide rectangle with a fill (only for horizontal/vertical lines of course).

    e.g. for a full width horizontal line:

    
    

    Perfect 1px wide lines every time.

提交回复
热议问题