Simple fill pattern in svg : diagonal hatching

后端 未结 11 1844
轮回少年
轮回少年 2020-12-04 08:28

How would I fill an SVG shape, not with a single colour, an image or a gradient, but with a hatching pattern, diagonal if possible.

It\'s been 2 hours and I\'ve foun

11条回答
  •  醉梦人生
    2020-12-04 09:15

    Use the patternTransform attribute to rotate a vertical (or horizontal) line segment. This method tiles seamlessly and uses the simplest possible path. The pattern width attribute controls how close parallel hatches are.

    
      
    
    

提交回复
热议问题