Subtract one circle from another in SVG

前端 未结 4 1955
自闭症患者
自闭症患者 2021-02-01 14:12

I\'m trying to find a way to subtract one shape from another in SVG, creating a hole in the middle or a bite out of the side of it. Kind of like a clipping path, but instead of

4条回答
  •  误落风尘
    2021-02-01 14:42

    |*| Mask : Used to Subtract Objects :

    |=> fill="white" => Blocks to display
    |=> fill="black" => Blocks to Remove

    |=> fill="white" => Put the Display Block also inside mask tag and fill white
    |=> fill="black" => Put the Remove Block inside mask tag and fill black

    |::| Example to use mask to remove center small rect from large rect

    
    
        
        
    
    

    |::| Example to use mask to remove center small circle from large circle :

    
    
        
        
    
    

提交回复
热议问题