zoukankan      html  css  js  c++  java
  • 将svg中多个path合并成单个path

    保留原本的属性,按照颠倒的顺序将第一个元素的d属性添加到第二个元素的d属性之前,用空格分隔

    若第一个path为

      <path d="M972.810838 298.631144c-122.73839-122.73839-285.936809-190.342764-459.524787-190.342765-173.580752 0-336.779172 67.59715-459.524787 190.342765a43.342807 43.342807 0 0 0 30.655698 73.998504 43.248882 43.248882 0 0 0 30.655697-12.694334c106.366528-106.366528 247.781556-164.946871 398.206167-164.946871s291.854089 58.580343 398.220617 164.946871a43.350032 43.350032 0 0 0 61.311395-61.30417z" fill="" p-id="2608"></path>
    
    

    第二个为

      <path d="M513.286051 345.803203c-121.365639 0-235.462922 47.265985-321.281535 133.077373a43.342807 43.342807 0 0 0 0.007225 61.30417c8.460481 8.467706 19.558089 12.701559 30.648472 12.701559s22.187991-4.233853 30.655698-12.701559c69.432301-69.439526 161.760643-107.681479 259.962915-107.681479 98.209497 0 190.53784 38.241953 259.977365 107.681479a43.328357 43.328357 0 0 0 61.296945 0 43.335582 43.335582 0 0 0 0-61.30417c-85.796938-85.818613-199.901446-133.077372-321.267085-133.077373zM327.59619 659.614083a43.350032 43.350032 0 0 0 61.296945 61.30417c68.5942-68.586975 180.184407-68.586975 248.785832 0a43.219982 43.219982 0 0 0 30.648472 12.694334 43.335582 43.335582 0 0 0 30.648473-73.998504c-102.392775-102.392775-268.986947-102.392775-371.379722 0zM513.286051 823.036478a43.342807 43.342807 0 0 0-35.445876 73.752854c9.768207 9.760982 22.614267 14.645086 35.445876 14.645086s25.677669-4.884104 35.445876-14.645086a43.342807 43.342807 0 0 0-35.445876-73.752854z" fill="" p-id="2609"></path>
    
    

    合并后

      <path  d="M972.810838 298.631144c-122.73839-122.73839-285.936809-190.342764-459.524787-190.342765-173.580752 0-336.779172 67.59715-459.524787 190.342765a43.342807 43.342807 0 0 0 30.655698 73.998504 43.248882 43.248882 0 0 0 30.655697-12.694334c106.366528-106.366528 247.781556-164.946871 398.206167-164.946871s291.854089 58.580343 398.220617 164.946871a43.350032 43.350032 0 0 0 61.311395-61.30417z M513.286051 345.803203c-121.365639 0-235.462922 47.265985-321.281535 133.077373a43.342807 43.342807 0 0 0 0.007225 61.30417c8.460481 8.467706 19.558089 12.701559 30.648472 12.701559s22.187991-4.233853 30.655698-12.701559c69.432301-69.439526 161.760643-107.681479 259.962915-107.681479 98.209497 0 190.53784 38.241953 259.977365 107.681479a43.328357 43.328357 0 0 0 61.296945 0 43.335582 43.335582 0 0 0 0-61.30417c-85.796938-85.818613-199.901446-133.077372-321.267085-133.077373zM327.59619 659.614083a43.350032 43.350032 0 0 0 61.296945 61.30417c68.5942-68.586975 180.184407-68.586975 248.785832 0a43.219982 43.219982 0 0 0 30.648472 12.694334 43.335582 43.335582 0 0 0 30.648473-73.998504c-102.392775-102.392775-268.986947-102.392775-371.379722 0zM513.286051 823.036478a43.342807 43.342807 0 0 0-35.445876 73.752854c9.768207 9.760982 22.614267 14.645086 35.445876 14.645086s25.677669-4.884104 35.445876-14.645086a43.342807 43.342807 0 0 0-35.445876-73.752854z" fill="" p-id="2609"></path>
    
    
  • 相关阅读:
    iSCSI又称为IPSAN
    文档类型定义DTD
    HDU 2971 Tower
    HDU 1588 Gauss Fibonacci
    URAL 1005 Stone Pile
    URAL 1003 Parity
    URAL 1002 Phone Numbers
    URAL 1007 Code Words
    HDU 3306 Another kind of Fibonacci
    FZU 1683 纪念SlingShot
  • 原文地址:https://www.cnblogs.com/ives/p/svg_path.html
Copyright © 2011-2022 走看看