当前位置: 代码迷 >> 综合 >> SVG基本形状绘制总结
  详细解决方案

SVG基本形状绘制总结

热度:1   发布时间:2024-01-18 01:22:40.0

线段:<line x1=" " y1=" " x2=" " y2=" " style=" "/>

矩形:<rect x=" "  y=" "  width=" "  height=" "  style=" "/>

圆角矩形:<rect x=" "  y=" "  rx=" "  ry=" "  style=" "/>

圆形:<circle cx=" "  cy=" "  r=" " style=" "/>

椭圆形:<ellipse cx=" "  cy=" "  rx=" "  ry=" "  style=" " />

多边形:<polygon points="      "  style=" "/>

折线:<polyline points="    "  style=" "/> //注意需把fill设成none


SVG有两种判断某个点是否在多边形中的规则。分别对应fill-true属性的nonezero(默认值)和evenodd。其效果图分别如下:

  相关解决方案