SVG marker-mid on specific point on path

后端 未结 2 1065
忘掉有多难
忘掉有多难 2020-12-17 00:43

I got some code that generates pathes on canvas. the path objects looks similar to this :



        
2条回答
  •  既然无缘
    2020-12-17 01:14

    The marker-mid defines the arrowhead or polymarker that shall be drawn at every vertex other than the first and last vertex of the given element or basic shape.

    You are drawing a line with vertices A, B, and C, so by definition the marker will be drawn at B.

    If you want a marker to be drawn between A and B you will need to draw a path from A to the midpoint AB to B.

    
      
        
          
        
      
      
      
    

提交回复
热议问题