Can strokes be used as part of clip-paths in SVGs?

前端 未结 1 527
北荒
北荒 2021-01-19 17:05

I am in the middle of writing SVG output from MuPDF, and I\'ve run up against what seems to be a limitation in the capabilities of SVG. I thought I\'d ask here in case this

1条回答
  •  借酒劲吻你
    2021-01-19 17:59

    Clip-paths in svg are meant to be just the shape, not the traits of the shape, so in other words you'll not get the stroke included. What you can do is use a mask instead, setting the stroke of the path in the mask to white.

    Here's an example:

    
      
        
          
        
      
    
      
      
        
      
    
    

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